dotnet/releases/net46/dotnet46-changes.md

24 KiB

.NET Framework 4.6 Release Notes

.NET Framework release notes describe product improvements grouped by product area. Each change includes a Microsoft-internal VSTS bug number, which acts as a useful unique ID for each change (can be used to report issues or when calling Microsoft Support).

Post-release servicing updates are also included, appended to the end of each product area. The following servicing updates have been included:

ASP.NET

  • State Service startup type is correctly persisted. [1038077]
  • Registry settings preserved during upgrade. [1038147]
  • Medium trust in ASP.NET 4.5 application doesn't cause execution permission exception. [1038337]
  • WebForm_DoCallback XHR doesn't break IDN support. [1040710]
  • .NET quirks and compatibility switches can be specified in ASP.NET configuration file. [1041102]
  • SignalR memory leak fixed. [1042247]
  • Quirks can be activated from ASP.NET even when a TFM is not specified. [1068433]
  • Membership UpdateUser and UpdateUserInfo don't cause SQL deadlock. [1131099]
  • Handles aborted XmlHttpRequest correctly. [983362]
  • ASP.NET allows config settings changes to affect CLR initialization. [994276]
  • HttpEncoder.UrlPathEncode doesn't encode the IDN part of the URL. [995259]
  • WebUIValidation.js correctly mapped on WebDev.WebServer 4.5.3. [998958]
  • Background flushes don't cause pipeline corruptions when using the TAP-friendly synchronization context. [1020085]
  • ASP.NET recognizes Edge browser. [1031688]
  • Databinding methods can be used in async binding. [1082492]
  • Removed a contention in System.Web.BufferAllocator. [1084913]
  • Setting request headers doesn't initialize ServerVariables. [1085748]
  • Fixed a crash in IIS Manager when opening content view. [1093488]
  • New web site template doesn't cause warnings. [1099514]
  • Browsing to an asmx file or wsdl with an IDN binding set in IIS doesn't cause a URI parsing exception. [110223]
  • Request validation can be completely disabled in an application. [412689]
  • EmailAddress attribute can load error message from resource. [468241]
  • GridView.CreateChildControl returns the correct CreatedRowCount when CustomPaging is enabled. [782891]
  • Custom output cache providers don't cause exception on cache policy settings serialization when more than one invalidation handler is present. [789904]
  • VaryByContentEncoding is now case-insensitive. [830641]
  • HttpContextWrapper.IsPostNotification returns the correct value based on pipeline event. [839206]
  • HtmlTextWriter renders
    element as self-closing tag. [852940]
  • Posting invalid payload to ASP.NET with trace and 4.0 request validation enabled doesn't crash the worker process. [867196]
  • MemoryCache doesn't throw null reference expression when CacheItemPolicy.UpdateCallback is defined. [879799]
  • DiskBuildResultCache.CacheBuildResult has a null check for CompiledResult.ResultAssembly. [880034]
  • ContentDisposition constructor doesn't modify date values of the provided disposition string. [884362]
  • Calling MachineKey.Decode on ASP.NET application start or on first request doesn't throw null reference exception. [896595]
  • MemoryCache Trim method evicts all items. [902234]
  • Overloads of HttpUtility.UrlEncode and UrlEncodeToBytes taking (byte[] bytes, int offset, int count) respects the offset and count parameter values. [912606]
  • Setting culture to auto:* in web.config doesn't cause CultureNotFoundException. [714999]

BCL

  • Projected DirectX value types can be marshalled to WinRT. [1166515]
  • New WeakReference() doesn't cause COMException. [973791]
  • Persian calendar is a supported formatting calendar, correctly handles part of day formatting, and uses correct era names. [1068336], [1117304], [1154104], [1087763]
  • DateTime Parse and TryParse behave the same on en-CA culture. [1117950]
  • AAD has integrated check for the pooled connection. [1118488]
  • French and Norwegian culture display name includes proper Unicode characters. [1147042]
  • ConcurrentDictionary serialization format changed, but is upwards compatible from .NET Framework 4.5 to .NET Framework 4.6. [1167398]
  • SqlBulkCopy truncates data before encrypting. [1159595]
  • GetProviderSpecificValue returns proper data type for encrypted columns when underlying data is null. [1159595]
  • French and Norwegian culture display name includes proper Unicode characters. [1147042]
  • X509Certificate2 supports Cng key pairs. [1158068], [1129677]
  • GDI+ reentrant paint operations fixed. [1075715]
  • System.Diagnostics.ProcessStartInfo can be deserialized. [1076704]
  • Culture resources added for newly supported Windows cultures. [1038210]
  • Current culture and UI culture travel through async calls. [1038253]
  • new TaskCompletionSource(null, TaskCreationOptions.RunContinuationsAsynchronously) doesn't throw ArgumentOutOfRangeException. [1042823]
  • WebSockets server doesn't cause false positive AccessViolation exceptions. [1064642]
  • FrameworkEventSource doesn't crash on Windows 7. [1067139]
  • EventSource.DecodeObject doesn't cause a crash on application launch. [1070394]
  • GetCurrentProcess() doesn't throw a SecurityException in a partial trust component. [1071695]
  • TimeZoneInfo correctly handles start and end of year transitions. [1072355]
  • Connections made using SPN in managed code don't fail with index out of range exception. [1120248]
  • XSD schema validation detects violation of unique constraint if compound key is used and one is empty. [1122756]
  • SqlSessionStateStore logs exception details when partition resolver is used. [1123428]
  • XsdDataContractImporter.Import method doesn't throw InvalidDataContractException when CanImport method returns true. [1124661]
  • RangeCheck enforces practical limits in order to avoid stack overflow. [1127981]
  • NetTcp with X509 certificates using SslStream allow negotiation for more secure cipher suites. [1128085]
  • TrustManager doesn't cause false warnings when comparing certificates. [1134066]
  • SqlBulkCopy works with TCE enabled columns. [1134668]
  • System.Runtime.Serialization.Primitives expose new public read-only properties for previously internal data contract attributes. [1136078]
  • Attribute.GetCustomAttributes doesn't throw AmbiguousMatchException when parameter types can disambiguate. [976721]
  • WinRtToNetFxStreamAdapter implements SetLength correctly. [977936]
  • Improved performance of System.IO.Path.GetFullPath and NormalizePath. [989059], [989062]
  • Improved performance of System.Version.ToString and TryParseVersion. [989081], [989086]
  • Security attributes added to Microsoft.JScriptEngine [991436]
  • ControlVersionInfo.ProductVersion doesn't throw null reference exception. [997521]
  • Encoding.GetEncoding gives clues about failure causes. [997703]
  • Introduced 1, 2, and 3-argument overloads of String.Format with IFormatProvider first argument to improve performance. [999405]
  • MemoryCache.AddOrGetExisting() checks the right expiration date. [999957]
  • Exception.Data on Windows 8 includes IRestrictedErrorInfo information. [1000662]
  • ReflectionModelServices.IsExportFactoryImportDefinition doesn't throw ArgumentException. [1005218]
  • Private GetRuntimeResourceString method added back to maintain compatibility of CompositeC1 CMS. [1005727]
  • AppDomainSetup.DynamicBase supported with UseRandomizedStringHashAlgorithm. [1008953]
  • Win32Exception shows a generic error message for messages longer than 256 characters. [1013367]
  • PreAuthenticate cache is effective beyond 100 URLs. [1014364]
  • CngKey members such as IsEphemeral don't throw CryptographicException on unsupported properties. [1014482]
  • Removed contention at BufferOutputAsyncStream for self-hosted WCF restful service using transfermode as Streamed. [1015747]
  • Added Array.Empty() to help avoid unnecessary allocations. [1020141]
  • HttpWebRequest succeeds when used with tracing against HTTPS endpoints with elliptic curve cryptography. [1020499]
  • JIT array of Single not initialized with Double values. [1027378]
  • Parallel.Invoke with one delegate executes on the current thread instead of queueing the work. [1027413]
  • SortOption uses the SortDirection passed in the constructor. [1030167]
  • Fixed timezone conversion in cases when year start or end with daylight savings wasn't correctly handled. [1079914]
  • Fixed AssemblyInformationalVersion. [1082536]
  • Fixed serialization and de-serialization of DateTime with daylight savings and special values. [1087198]
  • IO exceptions moved to System.Runtime. [1090978]
  • CultureInfo.CurrentCulture setter works in APPX mode. [1091999]
  • ParameterBuilder.SetConstant(null) doesn't throw argument exception for a nullable value type's default value. [1098429]
  • GetClassLayout can be called from rejit instrumentation. [1101065]
  • GetTypeForTypeID doesn't lock exe of the process being debugged. [1101402]
  • Euro is now the currency for Lithuania. [1102772]
  • Idnhost property of Uri class is now public. [1103357]
  • Fixed issues from initial use of EventSource's activity tracing capability. [1103452]
  • Fixed SqlHierarchyId operation failure due to invalid binary string. [1106619]
  • ToolboxItem.Equals optimized. [1106966]
  • Removed AppVerifier false positives in ISAPI mode. [1108193]
  • SQL connection strings greater than 779 characters don't cause application crash. [1109784]
  • Improved debuggability when users create incorrect EventSources. [1109972]
  • AsyncLocal.Value doesn't lose value when ExecutionContext is modified inside an async method. [1111403]
  • Removed unused BinaryCompatibility.TargetsAtLeast_Desktop_v4_5_3 from System.Diagnostics.Eventing.EventSource and System.Xml. [1111861]
  • SqlException can be caught. [1112280]
  • System.Windows.Diagnostics.VisualDiagnostics.GetXamlSourceInfo supports non-DependencyObjects. [1116127]
  • CancellationToken.Register doesn't throw ObjectDisposedException when its CancellationTokenSource is disposed. [369196]
  • System.IO.Path performance improved by not boxing characters and then calling ToString. [467858]
  • Subdomain cookies are correctly handled by CookieContainer. [520819]
  • Decimal parsing can handle [-]0eN where N > 0. [568475]
  • Fixed Lybian time zone daylight savings initial transition. [698652]
  • Made BinaryCompatibility internal. [808512]
  • Fixed InvalidDataException when using ZipArchive.GetEntry. [823402]
  • Improved performance of System.Guid.ToString by using fast string allocation instead of new char[]. [825882]
  • System.Threading.Gen2GcCallback finalizer checks for uninitialized GCHandle before using it. [837365]
  • Fixed four unlocalized strings in DAN and JPN cultures. [840067]
  • XmlEncodeRawTextWriter and XmlUTF8RawTextWriter are checking for invalid surrogate pairs correctly. [851030]
  • Implemented public static unsafe Buffer.MemoryCopy. [862315]
  • Improved performance of String.Format and StringBuilder.AppendFormat by avoiding object array allocations. [915876]
  • Removed a bottleneck in System.ComponentModel.DataAnnotations.ValidationAttribute.IsValid by removing a lock. [921828]
  • DpapiDataProtector doesn't fail because of SHA256.Create() when FIPS compliance is mandatory. [923431]
  • Improved System.Design!System.ComponentModel.MenuCommandService.FindCommand by avoiding the boxing of Guids. [925312]
  • Eliminated implicit allocationof WaitCallback objects by caching the delegate in a static field. [925992]
  • Eliminated a hang in HttpClient when an exception is thrown during BeginRequestStream. [926740]
  • Unix date time strings are now supported through DateTimeOffset.FromUnixTimeSeconds, FromUnixTimeMilliseconds, and ToUnixTimeMilliseconds. [933584]
  • Improved performance by using StringBuilderCache in Environment.GetEnvironmentVariable. [934009]
  • Fixed ArgumentOutOfRangeException in IPAddress.MapToIPv4(). [944709]
  • Read-only interfaces are implemented on collection types HashSet, LinkedList, Queue, SortedDictionary<TKey, TValue>, SortedList<TKey, TValue>, SortedSet, and Stack. [944715]
  • AddOnSendingHeaders doesn't fire prematurely. [952802]
  • EventSource doesn't aggressively fail when using reserved keywords. [955350]
  • Eliminated a leak when calling IReflect.InvokeMemberon a native IDispatchEX implementation through IReflect or IExpando. [957933]
  • IsolatedStorage feature works when configured to place storage on roaming profiles. [961127]
  • Text encoding is extensible. [963034]
  • Fixed the size of Vector. [1020874]
  • System.Drawing.Icon.ToBitmap() supports PNG framed icons. [1084802]
  • Uri constructor doesn't throw ArgumentOutOfRangeException when parsing certain URIs with escaped international characters. [1173958]
  • When using RSACng (or another class which directly or indirectly uses RSACng) to perform encryption using RSAEncryptionPadding.Pkcs1 when the private key is stored on a smartcard (or other hardware security module) an exception of System.Security.Cryptography.CryptographicException: The parameter is incorrect. at System.Security.Cryptography.NCryptNative.DecryptData[T](SafeNCryptKeyHandle key, Byte[] data, T& paddingInfo, AsymmetricPaddingMode paddingMode, NCryptDecryptor`1 decryptor) [299303] [Added: May 2017]

CLR

  • AppContext values can be overridden by registry settings. [1076165]
  • Asmx service references can be added to store apps. [1078198]
  • CrossGen and NGen create identical System.Core native images. [1033601]
  • ICorProfilerCallback6 doesn't leak reference count. [1038285]
  • Loading design-time metadata at debug time for universal Windows apps is supported. [1038300]
  • Multi-core JIT doesn't deadlock from loop of structs and hang Visual Studio. [1043199]
  • ICorDebug heap enumeration doesn't skip objects. [1063297]
  • WinMDExp/CCI allow reading record kind 0x5/0x6. [1073349]
  • ETW tracing for WebRequest works reliably when garbage collection happens. [1136690]
  • Fixed a deadlock in case of StackOverflow. [1138065]
  • Improved performance reading from the redirected output stream. [997190]
  • Product version is correct in binaries' properties. [997577]
  • RyuJIT is on by default. [10175592], [1020209]
  • Only one GC/Start ETW event is triggered for each GC. [1020142]
  • Fixed issue with wrong processor architecture being recorded on non-GAC assemblies, causing them to fail loading. [1020167]
  • No opportunistic tail calls when there are pinned variables. [1020867]
  • RyuJIT correctly handles edit and continue on instance synchronized methods. [1020967]
  • Fixed x64 JIT assignment to struct, where LHS also appears on RHS. [1021056]
  • CLR checks assembly architecture when skip IL loading feature is enabled. [1024293]
  • Native images generated by CrossGen for .NET Framework have processor architecture data. [1028975]
  • CLR emits all versions of the ModuleLoad/ModuleUnload ETW events. [1029164]
  • Future DFL and FFL handled. [1030154]
  • Unresolvable SID in SDSAM handled. [1030161]
  • Crossgen / ReadyToRun images are treated as IL by CLR. [1084749]
  • Fixed a RyuJIT regression causing System.Web.HttpApplication.ExecuteStep to incorrectly handle exceptions associated with redirections. [1088278]
  • Setup doesn't disable CAPI2 event logs. [1090378]
  • WindowsBase uses C# exception filters. [1090886]
  • Libraries can define switches without modifying mscorlib. [1092007]
  • No GC regions can be specified. [1096946]
  • Fixed lock ordering violation between rejit lock and ETW rundown. [1104691]
  • NGen compresses native images on devices with limited amount of disk space. [1107517]
  • TargetFrameworkAttribute is not always null for non-default AppDomains. [430136]
  • Sos.dll dumpheap reports correct TotalSize. [484532]
  • Lc.exe can handle response files. [621761]
  • MixedMode debugging a Windows Store C# application that calls a C++/CX WinRT component doesn't cause and access violation. [764121]
  • Fixed access violation caused by WinRT class names without namespace. [738932]
  • Fixed breaking change in COR_PRF_GC_ROOT_HANDLE values. [800872]
  • Improved free list efficiency in Gen2 garbage collection. [841334]
  • Made heap_of less expensive for server GC. [896400]
  • GC datastructure isn't made unreasonably large when the new segment's address is far from the existing ones (64-bit). [897049]
  • Win32Native.MEMORYSTATUSEX is a struct, not a class. [899371]
  • Eliminated a deadlock condition in RuntimeResourceSet. [905813]
  • _Delegate* also has IDispatch vtable entries for non-generic delegates. [922080]
  • Module rundown events are generated before method rundown events, improving performance. [939400]
  • CLR returns rejit info after first rejit. [952954]
  • Fixed the performance for enums based on primitive integral types other than int while maintaining the roundtrip between 4.0 and 4.5. [965865]
  • .NET Framework Setup UI correctly scales controls in high DPI. [968115]
  • SIMD types in System.Numerics.dll are recognized by the JIT. [1168471]

Entity Framework

  • Entity data source can be configured without causing an exception about the provider not returning a ProviderManifest instance. [810937]

WCF

  • Adding a service reference to a class library doesn't cause compilation errors. [1063611]
  • CustomBinding honors security header layout mode of Lax / LaxTimeStampLast. [1136398]
  • DataContractSerializer doesn't throw InvalidCastException on StringDictionary serialization. [1008489]
  • Fixed that WCF friendly instance names limited to 64 characters could cause false duplicates as instance names support up to 128 characters. [1022700]
  • Roles.GetRolesForUser() doesn't throw NullReferenceException in a WCF service hosted in ASP.NET with the AspNetCompatibilityEnabled flag set to false. [1022754]
  • ProcessMessage31 uses cached delegate for ProcessMessage4. [1030713]
  • System.ServiceModel.Syndication.SyndicationFeed can parse . [1088425]
  • Client certificate information is added as claim by default. [1103426]
  • Warning message added if users enable "wcf:ensureUniquePerformanceCounterInstanceNames" app setting without the user hosting the service having the proper permissions. [1108004]
  • Fixed null reference and access violation exceptions in System.ServiceModel.Channels.MessageHeaders.GetBufferedMessageHeaderReaderAtHeaderContents. [1116949]
  • WebResponseInputStream doesn't swallow the exception stating that the stream doesn't support read timeouts. [288814]
  • Auto-generated help produces correct links. [852865]
  • Added a keep-alive timeout on WCF ServiceHost. [948289]
  • Fixed a null reference exception in System.Runtime.Serialization when ETW is enabled. [1137758]

Windows Forms

  • Icon.ToBitmap() supports PNG framed icons. [1074253]
  • Adding large image to resource file doesn't cause error in 300% high DPI mode. [1096726]
  • System.Windows.Input.Cursor supports multi-image cursor files. [673619]
  • Closing a parent form in MDI applications doesn't throw System.ComponentModel.Win32Exception (Error creating window handle) [847648]
  • Fixed a null reference exception when messages continue arriving after a native tooltip window has been disposed. [933930]
  • Using custom MessageFilter doesn't cause sporadic IndexOutOfRangeException in ThreadContext. [1072924]
  • WIT grid's sorting arrows scale for high DPI. [745286]
  • NumericUpDown scroll buttons scale for high DPI. [906184]

Workflow

  • WorkflowService design-time validation can be cancelled. [1162560]
  • ActivityExecutor.OnExecuteWorkItem has improved performance on RyuJIT. [1136333], [1136377]
  • Improvements to out-of-sequence calls in WF State Machine [1018947]
  • Added synchronization to DynamicModuleManager to prevent debugger from crashing the debugged application. [1112002]
  • Default TransactionException extended to include the distributed transaction ID in error message. [954268]
  • Workflow Foundation implementation for SQL better handles transient database errors. [1152472]

WPF

  • Selecting a XAML element with an empty start tag doesn't select its first child instead. [1117943]
  • Retrieving the font family name for DengXian in WPF doesn't cause an argument exception. [1153238]
  • Data grid row headers can be right-clicked without changing the current row selection. [1064465]
  • GlyphRun.InkBoundingBox() and FormattedText.Extent return the same values. [1068545]
  • RibbonGroup background is not transparent. [1119792], [1119821]
  • PrintQueue.GetPrintCapabilities doesn't cause memory leak. [1134697]
  • TreeView doesn't scroll to random position when nodes are expanded and collapsed repeatedly. [1137957]
  • Running MultipleTopWindows cross AppDomain on Windows 8 and 10 doesn't throw. [1138471]
  • Debugging WPF in browser application doesn't cause SecurityException in PresentationFramework.dll. [1145697]
  • List virtualization doesn't cause crash in GitHub for Windows. [992770]
  • Scrolling in virtualized DataGrid with items of different heights doesn't cause ArgumentNullException. [996725]
  • WriteableBitmap isn't causing leaks of CWriteProtectedBitmap virtual memory. [997584]
  • Selection doesn't incorrectly include the previously selected item when moving selection of ListBoxItem bound to ObservableCollection. [999613]
  • Fixed a UI thread deadlock in pen input code. [1010998]
  • Margins set in sections in FlowDocuments are respected. [1104560]
  • Scaling doesn't suffer from rounding errors on odd DPI. [1104807]
  • Improved thread safety when loading the same XAML resource for the first time in multiple UI threads. [12520]
  • Touch and stylus events don't stop firing after disconnecting then reconnecting to a remote desktop session. [659672]
  • Fixed a bouncing scrollbar with custom WPF DataTemplate. [759702]
  • GetFixedDocumentSequence doesn't throw with error message "UnicodeString property does not contain enough characters to correspond to the contents of Indices property." [796882]
  • Fixed slow and jumping WPF TreeView issue. [810163]
  • Fixed overflow exception in WPF System.ServiceModel.Channels.TransmissionStrategy.AddToWindow. [811734]
  • Fixed InvalidOperationException in multithread application by synchronizing access to the static Stack<> that holds SerializationContext for recycling. [834091]
  • Snapping and unsnapping the keyboard on a Surface Pro doesn't cause null reference exception in WPF touch input stack. [839668]
  • TreeView doesn't vanish after node collapse and expand. [888530]
  • Selected items in a WPF ListBox or ListView control are correct when items.refresh is called from code behind. [945407]
  • Fixed performance regression in WPF applications caused by the loading of three additional assemblies. [946388]
  • XamlBuildTask doesn't sporadically report error "Object '' has been disconnected or does not exist at the server" on TFS builds. [955825]
  • Fixed exception at CaretElement.ConvertToInt32 in WPF TextBox.Focus. [958636]
  • WPF uses the most recent distance threshold from the registry for recognizing double taps. [959263]
  • WPF allows for transparent child windows. [959266]
  • Fixed FlowDocument exception "this TextNavigator has no scoping text element." [960678]
  • FlowDocument preserves spaces after being saved using XamlWrite. [960699]
  • Improved UI scrolling when using a virtualized ListView with a pixel scroll unit. [965665]
  • Fixed null reference exceptions in WPF System.Windows.Controls.ItemContainerGenerator.ContainerFromIndex. [966623]
  • Improved touch services. [971187]
  • Fixed RichTextBox spell checking issue with possessives. [1170165]
  • Window chrome doesn't turn black on maximize with GlassFrameThickness -1. [1176703]
  • Improved RichTextBox typing performance on low-end GPUs. [1177602]
  • Applications continue to promote touch events to click after digitizer is removed and reconnected while touching the digitizer. [1186170]
  • A WPF application with a virtualizing list control (ListBox, DataGrid, TreeView, etc.) can encounter an ArgumentNullException when scrolling to an item whose size has substantially decreased since the last time it was re-virtualized. [273803, 282662, 282664, 367282, 367285] [Added: May 2017]