Product

Top 10 New Improvements Found in the .NET Framework Version 4.6.2

By | | 8 min read


Summary
Learn more about the top 10 new improvements found in the .NET Framework Version 4.6.2.

In the late 1990s, Microsoft began working on a general purpose development platform that quickly became the infrastructure for building, deploying, and running an unlimited number of applications and services with relative ease while focusing on the Internet User Experience (IUE). Then, in February of 2002, Microsoft finally launched the first version of these shared technology resources under its original name, Next Generation Windows Services (NGWS). With DLL libraries and object-oriented support for web app development, the .Net Framework 1.0 was a digital transformation that introduced us all to managed coding.

Although .NET Core has been a focus in recent years, work on the original .NET Framework has still progressed. In fact, on August 2, 2016, Microsoft announced the much-anticipated release of Version 4.6.2. According to MS, there are “dozens of bug fixes and improvements.” Actually, there are almost 14 dozen bug fixes — 166 to be exact — not to mention all the API changes. Moreover, many of the changes found in this new version were based on developer feedback. Needless to say, things have definitely improved. The following is a list of the top ten improvements found in .NET 4.6.2:

1. Windows Hello

The Windows 10 Anniversary Update was released the same day as the latest .NET Framework. This version is already included with the anniversary update. Although it doesn’t show up as an installed application in “Programs and Features,” you can find it by searching for features and clicking on “Turn Windows features on and off.” From here, you can adjust your features accordingly, and select specific features by utilizing “developer mode.” Also, Windows Hello allows developers and programmers to use Windows Hello for their apps. For example, third-party developers can now allow users to log in with their face and fingerprint with ease. Simply download the framework update.

2. Removal of Character Limits (BCL)

Microsoft removed the 260 character limitation, MAX_PATH, for NTFS in Windows. Characters in .NET 4.6.2 are now classified based on the Unicode Standard, Version 8.0.0. You’re probably used to getting the “path too long issue” prompt, especially with MSBuild definitions. The error details usually state something like:

TF270002: An error occurred copying files: The specified path, file name, or both are too long.

Or the error might state something similar to:

Unable to create folder. Filename or extension is too long.

Programs and server tools can also show problems in these areas, and solutions normally involved renaming something to fit the profile. Usually not an issue for end users, this limitation is more common on developer machines that use specialized tools also running on Unix, or while building source trees. However, now that the MAX_PATH limitation has been removed, we may never have to see this error message again.

However, long paths are not yet enabled by default. Therefore, you need to set the policy to enable the support: “Enable Win32 long paths” or “Enable NTFS long paths.” Your app must also have a specific manifest setting. Also, there’s the use of long paths on any OS if you use the \\?\ syntax, which is now supported by this feature.

3. Debugging APIs (CRL)

The main adjustment to the CRL is that if the developer chooses, null reference exceptions will now provide much more extensive debugging data. The unmanaged debugging APIs can request more information and perform additional analysis. Next, a debugger can determine which variable in a single line of source code is null, making your job a lot easier.

MS reports state the following APIs have been added to the unmanaged debugging API:

4. TextBoxBase Controls (WPF)

For security purposes, the copy and cut methods have been known to fail when they are called in partial trust. According to Microsoft, “developers can now opt-in to receiving an exception when TextBoxBase controls fail to complete a copy or cut operation.” Standard copy and cut through keyboard shortcuts, as well as the context menu, will still work the same way as before in partial trust.

5. Always Encrypted Enhancement (SQL)

This database engine is designed to protect sensitive data, such as credit card numbers. The .NET Framework for SQL Server contains two important enhancements for Always Encrypted centered around performance and security:

  • Performance: Encryption metadata for query parameters is now cached. This means when the property is set to true (the default), database clients can retrieve parameter metadata from the server only once. This is true even if the same query is called multiple times.

  • Security: Column encryption entries in the key cache will be evicted after a reasonable time interval. This can be set using the SqlConnection.ColumnEncryptionKeyCacheTtl property. The default time is two hours, while zero means no caching at all.

6. Best Match (WCF)

NetNamedPipeBinding has been upgraded to support a new pipe lookup called “Best Match.” When using this option, the NetNamedPipeBinding service will force you to search for the service all the way to the best matching URI, found at the requested endpoint, instead of the first matching service found. For example, multiple WCF Data Services are known to frequently listen in on named pipes. Often, a few of these WCF clients could be connected to the wrong service. This feature is set to connect with “First Match” as the default option. If you wish to enable this feature, you can add the AppSetting to the App.config or Web.config file on the client’s application.

7. Converting to UWP

According to Developer Resources, Windows now offers capabilities to bring existing Windows desktop apps to the Universal Windows Platform. This includes WPF as well as Windows Forms apps. For example, WPF is a powerful framework and has become a mature and stable UI platform suitable for long-term development. However, it is also a complex beast at times, because it works differently from other GUI frameworks and has a steep learning curve. However, Microsoft always seems to plan ahead, and that’s where converting to the Universal Windows Platform (UWP) enhancement comes in. This improvement enables you to gradually migrate your existing codebase to UWP, which, in turn, can help you bring your app to all Windows 10 devices. Also, it makes UWP APIs more accessible, allowing you to enable features such as Live Tiles and notifications.

8. ClickOnce

Designed long before the invention of the App Store, ClickOnce allows applications to be distributed via URLs. It can even self-update as new versions are released. Unfortunately, security has always been a big concern. Many DevOps teams have shown frustration over MS’s failure to adopt TSL standards. Finally, in addition to the 1.0 protocol, this application now supports TLS 1.1 and TLS 1.2. In fact, ClickOnce will automatically detect which protocol to use, and no action is required to enable this feature.

9. SignedXml

An implementation of the W3C’s XML Digital Signature standard, SignedXml now supports the SHA-2 family of hashing algorithm.

The following are included signature methods, as well as reference digest algorithms that are frequently used:

  • RSA-SHA256

  • RSA-SHA384

  • RSA_512 PKCS#1

For more information on these and other security concerns, along with update deployment and developer guidance, please see Microsoft Knowledge Base Article 3155464, as well as the MS Security Bulletin MS16-065.

10. Soft Keyboard Support

On previous versions of .NET, it wasn’t possible to utilize focus tracking without disabling WPF pen/touch gesture support. Developers were forced to choose between full WPF touch support or Windows mouse promotion. In the latest version of Microsoft’s .NET 4.6.2, Soft keyboard support allows the use of the touch keyboard in WPF applications without disabling WPF stylus/touch support on Windows 10.

To find out which version of the .NET Framework is installed on a computer:

  1. Tap on the Windows key, type regedit.exe, and hit enter.

  2. Confirm the UAC prompt.

  3. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full

Check for a DWORD value labeled Release, which indicates you have the .NET Framework 4.5 or newer.

For all versions of the .NET Framework and its dependencies, please check the charts listed in the Microsoft library for more information.

If you want to have the complete .NET Framework set in your computer, you’ll need to install the following versions:

  • .NET Framework 1.1 SP1

  • .NET Framework 3.5 SP1

  • .NET Framework 4.6

The above list is only the tip of the iceberg when describing all the features and improvements that can be found in the .NET Framework Version 4.6.2. There are numerous security and crash fixes, added support, networking improvements, active directory services updates, and even typo correction in EventSource. Because Microsoft took user feedback into consideration, developers, programmers, and engineers may feel that Microsoft is finally listening to their needs and giving them a little more of what they want in their .NET Framework.

Learn more

Find out how AppDynamics .NET application monitoring solution can help you today.