README.md
.NET Framework Breaking Changes
The following documents provide information on .NET Framework breaking changes and changes in behavior, starting with .NET Framework 4.5.
- SoapFormatter cannot deserialize Hashtable and similar ordered collection objects
- XML schema validation is stricter
- WPF DataTemplate elements are now visible to UIA
- WPF TextBox selected text appears a different color when the text box is inactive
- List<T>.ForEach can throw exception when modifying list item
- System.Uri parsing adheres to RFC 3987
- System.Uri escaping now supports RFC 3986 (http://tools.ietf.org/html/rfc3986)
- System.Net.PeerToPeer.Collaboration unavailable on Windows 8
- MEF catalogs implement IEnumerable and therefore can no longer be used to create a serializer
- Missing Target Framework Moniker results in 4.0 behavior
- No longer able to set EnableViewStateMac to false
- BlockingCollection<T>.TryTakeFromAny does not throw anymore
- XmlSchemaException now sets line positions properly
- System.Activities is now APTCA
- WorkFlow 3.0 types are obsolete
- Some WorkFlow drag and drop APIs are obsolete
- New (ambiguous) Dispatcher.Invoke overloads could result in different behavior
- EncoderParameter ctor is obsolete
- EF version must match NetFX version
- Change in behavior for Task.WaitAll methods with time-out arguments
- Change in behavior in Data Definition Language (DDL) APIs
- MachineKey.Encode and MachineKey.Decode methods are now obsolete
- The Replace method in OData URLs is disabled by default
- System.ServiceModel.Web.WebServiceHost object no longer adds a default endpoint
- EventSource.WriteEvent impls must pass WriteEvent the same parameters that it received (plus ID)
- MinFreeMemoryPercentageToActiveService is now respected
- XmlTextReader DTD entity expansion is limited to 10,000,000 characters
- XSLT forward compat now works
- XSLT style sheet exception message changed
- WF serializes Expressions.Literal<T> DateTimes differently now (breaks custom XAML parsers)
- New enum values in WPF's PageRangeSelection
- WPF DispatcherSynchronizationContext.CreateCopy now returns a new copy instead of the current instance
- System.Threading.Tasks.Task no longer throw ObjectDisposedException after object is disposed
- Different exception handling for ObjectContext.CreateDatabase and DbProviderServices.CreateDatabase methods
- ObjectContext.Translate and ObjectContext.ExecuteStoreQuery now support enum type
- Enumerable.Empty<TResult> always returns cached instance
- HttpRequest.ContentEncoding property prohibits UTF7
- HttpUtility.JavaScriptStringEncode escapes ampersand
- Error codes for maxRequestLength or maxReceivedMessageSize are different
- EventListener truncates strings with embedded nulls
- WinRT stream adapters no long call FlushAsync automatically on close
- ObsoleteAttribute exports as both ObsoleteAttribute and DeprecatedAttribute in WinMD scenarios
- ResolveAssemblyReference task now warns on dependencies with the wrong architecture
- Opt-in break to revert from different 4.5 SQL generation to simpler 4.0 SQL generation
- WPF TextBox defaults to undo limit of 100
- WPF TextBox.Text can be out-of-sync with databinding
- WinForm's CheckForOverflowUnderflow property is now true for System.Drawing
- List.Sort algorithm changed
- Exceptions during unobserved processing in System.Threading.Tasks.Task no longer propagate on finalizer thread
- Compiler support for type forwarding when multi-targeting mscorlib
- IAsyncResult.CompletedSynchronously property must be correct for the resulting task to complete
- Log file name created by the ObjectContext.CreateDatabase method has changed to match SQL Server specifications
- Page.LoadComplete event no longer causes System.Web.UI.WebControls.EntityDataSource control to invoke data binding
- WebUtility.HtmlDecode no longer decodes invalid input sequences
- WebUtility.HtmlEncode and WebUtility.HtmlDecode round-trip BMP correctly
- Apps published with ClickOnce that use a SHA-256 code-signing certificate may fail on Windows 2003
- Managed browser hosting controls from the .NET Framework 1.1 and 2.0 are blocked
- Deserialization of objects across appdomains can fail
- DbParameter.Precision and DbParameter.Scale are now public virtual members
- EF no longer throws for QueryViews with specific characteristics
- SqlConnection can no longer connect to SQL Server 1997 or databases using the VIA adapter
- SqlBulkCopy uses destination column encoding for strings
- Sql_variant data uses sql_variant collation rather than database collation
- DataObject.GetData now retrieves data as UTF-8
- Assemblies compiled with Regex.CompileToAssembly breaks between 4.0 and 4.5
- TargetFrameworkName for default app domain no longer defaults to null if not set
- X509Certificate2.ToString(bool) does not throw now when .NET cannot handle the certificate
- Reflection objects can no longer be passed from managed code to out-of-process DCOM clients
- ContentDisposition DateTimes returns slightly different string
- ClickOnce supports SHA-256 on 4.0-targeted apps
- IL ret not allowed in a try region
- XmlWriter throws on invalid surrogate pairs
- WorkflowDesigner.Load doesn't remove symbol property
- SqlConnection.Open fails on Windows 7 with non-IFS Winsock BSP or LSP present
- ICommand.CanExecuteChanged event behaviour changed in .NET 4.5
- Some .NET APIs cause first chance (handled) EntryPointNotFoundExceptions
- Scrolling a WPF TreeView or grouped ListBox in a VirtualizingStackPanel can cause a hang
- WPF spawns a wisptis.exe process which can freeze the mouse
- Unexpected InvalidCastException from InvokeMethod activity in WF4
- Type.IsAssignableFrom returns wrong result for generic variables with constraints
- WPF Aero2 and AeroLite themes toggle button doesn't show any state
- EntityFramework 6.0 loads very slowly in apps launched from Visual Studio
- Multi-line ASP.Net TextBox spacing changed when using AntiXSSEncoder
- Linq to EF Join throws ArgumentOutOfRangeException
- XmlSerializer serializes fields differently in 4.5
- ConcurrentQueue<T>.TryPeek can return an erroneous null via its out parameter
- Profiling ASP.Net MVC4 apps can lead to Fatal Execution Engine Error
- Non-pooled SQL connections will leak memory if not explicitly disposed
- Multiple items in a single TableLayoutPanel cell may be rearranged
- Binding a WPF selector property (such as 'SelectedItem') to a static property does not work
- Foreach iterator variable is now scoped within the iteration, so closure capturing semantics are different (in C#5)
- HtmlTextWriter does not render
<br/>
element correctly - ListBoxItem IsSelected binding issue with ObservableCollection<T>.Move
- Right clicking on a WPF DataGrid row header changes the DataGrid selection
- Calling Items.Refresh on a WPF ListBox, ListView, or DataGrid with items selected can cause duplicate items to appear in the element
- ETW EventListeners do not capture events from providers with explicit keywords (like the TPL provider)
- Exception message has changed for failed DataContract serialization in case of an unknown type
- Accessing a WPF DataGrid's selected items from a handler of the DataGrid's UnloadingRow event can cause a NullReferenceException
- Building an Entity Framework edmx with Visual Studio 2013 can fail with error MSB4062 if using the EntityDeploySplit or EntityClean tasks
- NetDataContractSerializer fails to deserialize a ConcurrentDictionary serialized with a different .NET version
- XSD Schema validation now correctly detects violations of unique constraints if compound keys are used and one key is empty
- Calling Attribute.GetCustomAttributes on an indexer property no longer throws AmbiguousMatchException if the ambiguity can be resolved by index's type
- Intermittently unable to scroll to bottom item in ItemsControls (like ListBox and DataGrid) when using custom DataTemplates
- GlyphRun.ComputeInkBoundingBox() and FormattedText.Extent return different values beginning in .NET 4.5
- AppDomainSetup.DynamicBase is no longer randomized by UseRandomizedStringHashAlgorithm
- GridViews with AllowCustomPaging set to true may fire the PageIndexChanging event when leaving the final page of the view
- COR_PRF_GC_ROOT_HANDLEs are not being enumerated by profilers
- IPad should not be used in custom capabilities file because it is now a browser capability
- ADO.NET now attempts to automatically reconnect broken SQL connections
- FlowDocument may show an extra line of text
- System.Uri.IsWellFormedUriString method returns false for relative URIs with a colon char in first segment
- The .NET Framework 4.6 does not use a 4.5.x.x version when registering itself in the registry
- Null coalescer values are not visible in debugger until one step later
- Calling DataGrid.CommitEdit from a CellEditEnding handler drops focus
- ASP.NET MVC now escapes spaces in strings passed in via route parameters
- VB.NET no longer supports partial namespace qualification for System.Windows APIs
- Sharing session state with Asp.Net StateServer requires all servers in the web farm to use the same .NET Framework version
- Two-way data-binding to a property with a non-public setter is not supported
- Marshal.SizeOf and Marshal.PtrToStructure overloads break dynamic code
- PreviewLostKeyboardFocus is called repeatedly if its handler shows a Windows Forms message box
- A ConcurrentDictionary serialized in .NET 4.5 with NetDataContractSerializer cannot be deserialized by .NET 4.5.1 or 4.5.2
- Persian calendar now uses the Hijri solar algorithm
- WPF windows are rendered without clipping when extending outside a single monitor
- WPF spell checking in text-enabled controls will not work in Windows 10 for languages not in the OS's input language list
- Only Tls 1.0, 1.1 and 1.2 protocols supported in System.Net.ServicePointManager and System.Net.Security.SslStream
- Calling CreateDefaultAuthorizationContext with a null argument has changed
- WPF layout rounding of margins has changed
- XmlSerializer fails while serializing a type that hides an accessible member with an inaccessible one
- WPF TreeViewItem must be used within a TreeView
- WCF binding with the TransportWithMessageCredential security mode
- X509CertificateClaimSet.FindClaims Considers All claimTypes
- Application.FilterMessage no longer throws for re-entrant implementations of IMessageFilter.PreFilterMessage
- CurrentCulture is not preserved across WPF Dispatcher operations
- CurrentCulture and CurrentUICulture flow across tasks
- BinaryFormatter can fail to find type from LoadFrom context
- RSACng now correctly loads RSA keys of non-standard key size
- Remove Ssl3 from the WCF TransportDefaults
- Incorrect implementation of MemberDescriptor.Equals
- DataGridCellsPanel.BringIndexIntoView throws ArgumentOutOfRangeException
- Item-scrolling a flat list with items of different pixel-height
- Horizontal scrolling and virtualization
- Items.Clear does not remove duplicates from SelectedItems
- WPF Spell Checking fails in unexpected ways
- SignedXml and EncryptedXml Breaking Changes
- .Net Framework now supports Unicode standard version 8.0 categories
- Path colon checks are stricter
- RSACng.VerifyHash now returns False for any verification failure
- Connection pool blocking period for Azure SQL databases is removed
- Changing the IsEnabled property of the parent of a TextBlock control affects any child controls
- Long path support
- Changes in path normalization
- Calls to ClaimsIdentity constructors
- AesCrytpServiceProvider decryptor provides a reusable transform
- WCF transport security supports certificates stored using CNG
- WCF message security now is able to use TLS1.1 and TLS1.2
- Serialization of control characters with DataContractJsonSerializer is now compatible with ECMAScript V6 and V8
- Throttle concurrent requests per session
- Workflow now throws original exception instead of NullReferenceException in some cases
- WPF Grid allocation of space to star-columns
- WPF Pointer-Based Touch Stack
- WPF Printing Stack Update
- ObjectDisposedException thrown by WPF spellchecker
- RibbonGroup background is set to transparent in localized builds
- Workflow checksums changed from MD5 to SHA1
- NullReferenceException in exception handling code from ImageSourceConverter.ConvertFrom
- CspParameters.ParentWindowHandle now expects HWND value
- CoerceIsSelectionBoxHighlighted
- Workflow SQL persistence adds primary key clusters and disallows null values in some columns
- SslStream supports TLS Alerts