What’s new in Microsoft .Net Framework

The upgrade to the .Net Framework brings dependency injection for ASP.Net web forms, as well as other new features

What's new in Microsoft .Net Framework

Microsoft is offering developer pack for the beta version of .Net Framework 4.7.2, which includes dependency injection for ASP.Net web forms.

Beta version: New features coming in .Net Framework 4.7.2

Already popular in technologies such as the Spring Framework, dependency injection lets one object supply dependencies of another object. In the forthcoming .Net Framework 4.7.2, it will be easier to use this capability in ASP.net web forms. Setter-, interface- and constructor-based injection are supported, and other dependency injection frameworks can be plugged in.

What the .Net Framework 4.7.2 developer pack offers

The beta developer pack now available lets developers build applications targeting the planned .Net Framework 4.7.2 through use of Visual Studio 2015 or 2017 IDE versions, as well as with other IDEs.

Other planned features in .Net Framework 4.7.2 include:

  • The SameSite property is added to the ASP.Net web framework, to assert that a cookie ought not be sent with cross-site requests. The goal of the SameSite attribute is to reduce information leakage and protect against cross-site forgery attacks. The property is added in HttpCookieType. It also is featured in the FormsAuthentication and SessionState cookies.
  • To improve security and compliance, Azure Active Directory authentication is supported via an interactive authentication keyword added to multifactor authentication. It is an extension of the SqlClient Connection String.
  • APIs are added to standard collection types, enabling new functionality such as HashSet constructors that let HashSets be constructed with a capacity. This offers a performance benefit when it is known what the size of the HashSet is.
  • Cryptographic improvements simplify the creation of RSA and DSA objects and calling ImportParameters.
  • Windows Presentation Foundation (WPF) has added the StaticResource references feature letting a diagnostic assistant be notified when a StaticResource reference is resolved. For example, a diagnostic assistant such as Visual Studio’s Edit-and-Continue facility might want to update uses of a resource when it changes or a replaces a value in a resource dictionary.
  • The WorkflowDesignerColors class has been added to improve UI experiences in high-contrast mode.
  • Through Zlib decompression, throughput has been improved for decompressing Zip archives by using a native implementation of Zip.
  • .Net Framework workloads now can generate certificate-signing requests, enabling request generation to be staged into existing tools.

How to download the .Net Framework 4.7.2 developer pack

You can download the current beta .Net Framework 4.7.2 developer pack build from Microsoft’s .Net Blog.

Current version: What’s new in .Net Framework 4.7.1

With Microsoft’s release of .Net Framework 4.7.1 in mid-October 2017, the development platform gained critical improvements to garbage collection, security, and application configuration. 

To boost memory allocation performance, particularly for large object heap allocations, an architectural change to the garbage collector splits the heap allocation into small and large object heaps. Applications making a lot of large object heap allocations should experience a reduction in allocation lock contention and better performance.

The update also adds secure hash options for ASP.Net forms authentication, including SHA-2 (Secure Hash Algorithm), the stronger successor to SHA-1. For compatibility, SHA-1 is still the default option. SHA-2 is also supported for Message.HashAlgorithm, which specifies the hash algorithm used by message queuing when authenticating. 

New configuration builders in .Net 4.7.1 allow developers to inject and build configuration for applications at runtime. The configuration data can be taken from sources beyond the config file; in previous versions of .Net, configuration is static. Through configuration builders, applications are able to apply a custom-defined set of builders to a section of config. Builders can modify configuration data contained in a config section or build it from scratch, even drawing new data from sources other than static files.

Other features of the upgrade include:

  • Support for the .Net Standard 2.0 specification, which features a set of APIs shared by multiple .Net implementations.
  • Accessibility improvements in WPF (Windows Presentation Foundation) and Windows Forms, including High Contrast enhancements, enhanced UI patterns, and improved experiences in tools such as Narrator.
  • Visual diagnostics support in WPF, which enables the use of tools for analyzing XAML visual trees.
  • Compiler support for ReadOnlyReferences in the C# 7.2 language, for passing variables by reference but without exposing data to modifications.
  • A runtime feature detection API to determine whether a runtime supports a particular feature.
  • Serializable SystemValueTuple types, which should make it easier to migrate from System.Tuple to the new tuple syntax in C# 7.0 and Visual Basic 15.5.
  • An ASP.Net API providing a standardized way to build an HttpCookie object from a string and capture cookie properties such as expiration date and path.
  • An execution step feature in ASP.Net, called ExecutionStepInvoker, which allows developers to run execution steps inside their code, rather than in ASP.Net’s pre-defined pipeline. This feature is intended for libraries concerned with application execution flow.

You can download .Net Framework 4.7.1 from Microsoft’s Download Center. It is also accessible in the Windows 10 Fall Creators Update and via Visual Studio 2017 15.5.