November 12th, 2014

Announcing .NET 2015 Preview: A New Era for .NET

Updated (2017): See .NET Framework Releases to learn about newer releases.

Updated (July 2015): See Announcing .NET Framework 4.6 to read about the final version of the .NET Framework 4.6.

Today is a pivotal moment for .NET. With the release of .NET 2015 Preview, we are embarking on a new journey while maintaining our strong commitment to the 1+ billion customers that are using .NET today.

As Scott Guthrie and S. ‘Soma’ Somesegar announced at the Connect(); event today, .NET is entering a new era as it embraces open source as a core principle and enables .NET applications to run on multiple operating systems. As part of .NET 2015 Preview, we are delivering .NET Core 5 which is a completely open source stack and can run on multiple operating systems. In addition, not only are we contributing .NET Core 5 to the .NET Foundation but we will openly collaborate with the community and ensure that we continue our strong relationship with existing .NET open source communities, in particular the Mono community. Here are a set of announcement around open source and cross platform from today’s Connect(); event:

.NET Core 5 is the small optimized runtime for ASP.NET 5. It currently runs on Windows, and will be extended to Linux and Mac. You will have more choice of which operating systems you use for ASP.NET 5 development and deployment, supported by Microsoft. Azure will support ASP.NET 5 in both Linux and Windows VMs. You choose.

If you are already done reading and want to download the updates or check out our open source projects, please use the following links:

With this release of .NET, we are making major new investments in the future of .NET and laying the foundation for decades to come. We are calling today’s set of releases “.NET 2015 Preview”. The year denotes a single umbrella release that provides a cohesive experience and unifies the family of .NET technologies. It also helps us talk about all the releases that come out at the same time.

You can find more information on all of the following topics in this post:

.NET Open Source

Microsoft has a history of sharing .NET developer products as open source, including ASP.NET, Roslyn, NuGet, Entity Framework and Azure projects. You can now add .NET Core and .NET Framework reference source to that list.

We’re in the process of opening up all of .NET Core. Today, we’re publishing a few libraries, as a kind of down-payment. Expect to the see the corefx repo fill up over the next coming months and for a coreclr repo to appear. We’ll keep you up to date, here on the dotnet blog.

We’ve been joking that we’re going to “burn the ships”, meaning that we won’t be able to do development on .NET Core via internal Microsoft infrastructure anymore, only on GitHub. That’s what we’re working to make happen, that .NET engineers use the same tools that everyone else uses. We intend to use Pull Requests (PRs) for code reviews, use GitHub issues for bug tracking and post ideas to the .NET Foundation forums for discussion.

We’ve made .NET Framework Reference Source available for many years. We’re publishing the BCL reference source on GitHub under the MIT license.

.NET Framework Reference Source is an excellent and large source of .NET library code for improving both .NET Core and Mono. While we are using an open source license for .NET Reference source, we will not be taking PRs to that codebase. It’s a very large and mature codebase that is challenging to update without a lot of context and knowledge of our compatibility constraints. We believe that .NET Core is the best project for the community to engage on.

When it comes to .NET and open source, there are a key set of questions that are easiest to handle in a Q&A format. These are captured below. Please use the comments section for any additional questions.

What open source license is Microsoft using for .NET Core? MIT.

What can you do with the software? Are there restrictions? The MIT license plainly states that licensed software can be used “without restriction”.

Where is the code hosted? The source code for .NET Core is hosted on GitHub, within the .NET Foundation org. You can find other .NET open source projects from Microsoft at the dotnet home repo.

Will the .NET team accept PRs? Yes, starting today. Here’s our guidance on contributing to .NET Core.

Why isn’t all the code available today? One of the core promises around .NET open source is that any developer can build, test and run the code. To make this happen, we need to make sure that the engineering system is setup appropriately.

I see that .NET Core has been contributed to the .NET Foundation. Does that change my relationship with Microsoft for support? Contributing .NET Core to the .NET Foundation is a statement of Microsoft’s commitment to open source. Your relationship with Microsoft remains unchanged. In the simplest terms, we’ve merely moved our source code repository to a public location and adopted a liberal open source license. .NET remains fully supported and will be serviced by Microsoft as it always has been.

What does this open source project mean for the Mono Project? It means that Microsoft will be much more collaborative with the Mono Project and will encourage Mono developers to both take source from .NET Core to apply to Mono and do the same in reverse.

.NET Foundation

We announced the creation of the .NET Foundation earlier this year, to foster further innovation across the .NET ecosystem. The Foundation started with several projects and then added several more over sine it was established. Today, the foundation is announcing new additions:

  • .NET Core 5
  • ASP.Net Ajax Library
  • Kudu
  • Mono.Cecil
  • NuGet
  • Orchard
  • Thinktecture IdentityServer and IdentityManager

The addition of .NET Core into the foundation is a seminal moment. It means that the combination of .NET Core and all of the other projects that run on top of it represent a complete open source developer stack. Other programming platforms have complete open source stacks, and so too does .NET now.

The Foundation now has forums. Both the .NET Core and Mono Project teams have expressed interest in using these forums. Watch the forums for design, execution and strategic discussions. You might even catch Miguel de Icaza hanging out there, possibly posting on .NET support for Linux.

.NET Core 5

We first announced .NET Core 5 in April at TechEd North America as a “cloud optimized” version of .NET. We’ve now re-named this “.NET Core”, since it contains the core features of the .NET Framework and is also significantly smaller.

The focus and value of .NET Core is three-part: deployment, open source and cross-platform. We want to provide a version of .NET that you can use where you want and upgrade it when you want. You can use it on-premise, in Microsoft Azure as well as other cloud providers. You can use it on Windows, Linux or Mac. You can upgrade your apps (including .NET Core itself) to meet your business needs, independent of other apps that are running on a machine. You can modify .NET Core to support new scenarios or add features, and contribute those changes to .NET Core on GitHub.

.NET Core is very much in the same family as the .NET Framework. For example, the SIMD and Immutable Collections NuGet packages work on both the .NET Framework and .NET Core, by design. You can expect that most aspects of your development experience will be unchanged when targeting .NET Core. .NET Core has some great characteristics, but it should be considered an evolution of what we’ve been doing with the .NET Framework. With that in mind, we chose an evolutionary approach for versioning .NET Core, which is why it is version 5, the next whole number after 4.6, the latest version of the .NET Framework.

ASP.NET 5 is the first workload that has adopted .NET Core. ASP.NET 5 runs on both the .NET Framework and .NET Core. A key value of ASP.NET 5 is that it can run on multiple versions of .NET Core 5 on the same machine. Website A and website B can run on two different versions of .NET Core on the same machine, or they can use the same version. It’s up to you. Due to its smaller footprint, there are also some performance benefits that are specific to .NET Core, however, most of the ASP.NET 5 performance benefits apply to both the .NET Framework and .NET Core.

.NET Core has two major components. It includes a small runtime that is built from the same codebase as the .NET Framework CLR. The .NET Core runtime includes the same GC and JIT (RyuJIT), but doesn’t include features like Application Domains or Code Access Security. The runtime is delivered via NuGet, as part of the ASP.NET 5 core package.

.NET Core also includes the base class libraries. These libraries are largely the same code as the .NET Framework class libraries, but have been factored (removal of dependencies) to enable us to ship a smaller set of libraries. These libraries are shipped as System.* NuGet packages on NuGet.org.

As we update core components like the GC, JIT and base class libraries, we intend to include those improvements in both the .NET Framework and .NET Core. The use cases for those components are the same in both cases, as is the need for regular improvement. The .NET Core NuGet libraries will follow a similar pattern, running on the latest versions of the .NET Framework and the .NET Core runtime.

.NET Framework 4.6

The .NET Framework 4.6 is the next version of the .NET Framework. Leading up to the Preview release, we had been using .NET Framework 4.5.3, however since the payload includes significant features and improvements, we bumped up the version to clearly communicate the magnitude of changes. Note that in the Preview release, you’ll still see instances of “4.5.3” in the .NET Framework and Visual Studio version information. We will be updating these in future releases.

There are many great features in the .NET Framework 4.6 Preview, which you can use today. These range from new WPF features to RyuJIT as well as productivity enhancements in Visual Studio.

WPF Improvements and Roadmap

Today, the WPF team announced the roadmap for the WPF platform. Their post defines the areas of investment in future releases of WPF and details the current progress of improvements made to the WPF platform in the .NET Framework 4.6 and Visual Studio 2015.

The team has made key improvements to WPF in this release:

  • Transparent child windows
  • Multi-image cursor files
  • Re-designed Blend experience
  • New set of Visual Diagnostics tools
  • Timeline tool in the Performance and Diagnostics hub

clip_image002

The team has also fixed a set of customer reported issues. The best place to ask WPF questions or engage with the team is in the comments of the WPF team post.

Windows Forms High DPI

Windows Forms High DPI support has been updated to include more controls. The .NET Framework 4.5.2 included high DPI support an initial set of controls.

This feature has been expanded to include: DataGridView, ComboBox, ToolStripComboBox, ToolStripMenuItem, Cursor, DomainUpDown, NumericUpDown, DataGridViewComboBoxColumn, DataGridViewColumn and ToolStripSplitButton types.

This is an opt-in feature. To enable it, set the EnableWindowsFormsHighDpiAutoResizing element to true in the application configuration (app.config) file:

<appSettings>

<add key=”EnableWindowsFormsHighDpiAutoResizing” value=”true” />

</appSettings>

Next Generation JIT Compiler — RyuJIT

This release includes a new version of RyuJIT, the 64-bit JIT Compiler. It is enabled by default for 64-bit processes.

  • Correctness – We’ve been focusing on fixing correctness bugs, using various Microsoft cloud workloads to validate RyuJIT. This approach has been working well, since the Microsoft cloud is a very heavy user of .NET.
  • Real-World Throughput – The Bing team recently started using RyuJIT on some of their search-related workloads. Based on their initial experiments, they have seen a 25% improvement in startup time, which is a significant win.
  • SIMD Improvements – We created the SIMD .NET library in unison with RyuJIT so that RyuJIT could optimize the SIMD types. Lately, we’ve been tuning our use of registers in the RyuJIT SIMD optimizations. CPUs can crunch numbers much faster in registers, since they are effectively memory on the CPU.

While we have tried to make the transition to the new JIT compiler as transparent as possible, we also understand that there may be compatibility issues. If your application produces an undesired behavior on RyuJIT, you can try disabling RyuJIT, which switches your application back to using the previous JIT to determine if the problems you are seeing are caused by RyuJIT. If you come across any RyuJIT related issues, please tell us about it.

CLR Performance Improvements

The assembly loader now uses memory more efficiency by unloading IL assemblies after a corresponding NGEN image is loaded. This change is a major benefit for virtual memory for large 32-bit apps (such as Visual Studio) and also saves physical memory.

Support for converting DateTime to or from Unix time

New methods have been added to support converting DateTime to or from Unix time. This can be necessary, for example, when converting time values between a JavaScript client and .NET server. The following APIs have been added to DateTimeOffset.

  • static DateTimeOffset FromUnixTimeSeconds(long seconds)
  • static DateTimeOffset FromUnixTimeMilliseconds(long milliseconds)
  • long ToUnixTimeSeconds()
  • long ToUnixTimeMilliseconds()

ASP.NET Model Binding supports Task returning methods

ASP.NET Model Binding methods that were previously returning Task were not supported and threw an exception at runtime. With .NET Framework 4.6, if applications are deployed with such methods, these methods will now be executed correctly.

Channel support for managed EventSource instrumentation

You now can use .NET EventSource instrumentation to log significant administrative or operational messages to the event log, in addition to any existing ETW sessions created on the machine

.NET Language Innovation

In this release, several new C# and Visual Basic language features help reduce boilerplate and clutter in everyday code, encourage a more declarative style of programming, and bring the two languages even closer together. The features listed below will be available to both languages in the final release. A few highlights are shared below. Checkout the C# and VB Team blogs for all the details.

  • Methods, getter-only properties etc. can now have a single expression as their body, just like lambdas.
  • Nameof provides a refactoring-safe way of getting the name of e.g. a parameter, member or type as a string.
  • Auto-properties can have initializers and no longer require setters.
  • Index initializers Inside an object initializer you can now initialize a specific index of the new object. C# only.
  • Exception filters let you look at an exception and decide whether to catch it with a given catch block.
  • Using null-conditional operators you can get a built-in null check while accessing and invoking members and indexers.
  • Using clauses for static classes bring their static members directly into scope, so you can. call e.g WriteLine() or Sqrt() without prefixing with the class name.
  • Await now works in catch and finally blocks, obviating some very tricky workarounds.
  • String interpolation:  String interpolation provides a concise way of describing string templates that insert expressions into format strings (C# only at Preview, both VB and C# at RTM).

Visual Studio Improvements for .NET

The Visual Studio Team has added some key improvements for .NET. The biggest one of those isn’t a technical change, but a change in the product offerings.

Visual Studio Community There is now a new Visual Studio edition that is very similar to Pro and free for students, open source developers and many individual developers. It supports Visual Studio plugins like Xamarin or Resharper. The Visual studio blog has all the details on Visual Studio Community.

PerfTips Building high-performance apps can be hard. .NET gives you many great building blocks such as threads, async and a whole team at Microsoft that is continually improving the underlying performance of .NET. Still, performance can be a challenge. The Visual Studio team has built something truly great for determining the performance characteristics of your code and to help discover performance bottlenecks. PerfTips allow you to quickly and easily see performance bottlenecks as you are debugging your application.

Intuitive Breakpoint Settings Pretty much all .NET developers have wanted some kind of smarter breakpoints. The new and intuitive breakpoint settings make it a lot easier to change the behavior of breakpoints. Check out the Visual Studio Diagnostics blog for more details.

clip_image004

Setting breakpoints on auto-implemented properties Auto-implemented properties are a great convenience feature and this they have been around for a long time. However, there was no debugger support, until now. Visual Studio 2015 allows you to now set breakpoints in auto-implemented properties and step through the property, as shown below.

clip_image006

 

Lambdas in the debugger windows Lambdas are now supported in debugger windows, per this user voice request. To support lambda expressions as well as support new Roslyn-provided language features, the team had to completely rewrite the C# and Visual Basic expression evaluators. The example below drives home the point that the extra work was well worth it as you can now inspect lambdas in various debugger windows

clip_image008

Core IDE and Editing Improvements

The core IDE and editing experiences for C# and Visual Basic have been replaced with new experiences built on the .NET Compiler Platform (“Roslyn”). In general, the experience should be unchanged, but there are numerous small improvements.

  • Light Bulbs are the new home for all quick actions you take in the Visual Studio editor, including fixes to common code issues and refactoring code. When you have issues in your code, a Light Bulb displays suggested fixes for those issues. All refactoring operations have been moved to the Light Bulb, which you can access any time by typing Ctrl + <dot>. There are two new core refactoring operations: Inline temporary variable and Introduce local.

Here’s an example of the new Introduce local feature:

clip_image009

And an example of Inline temporary variable:

clip_image010

  • Refactoring support for Visual Basic has been added for the first time, and has also been moved to the Light Bulb.
  • The expression evaluator for C# and Visual Basic has been rewritten. Improvements include support for LINQ and lambda expressions in the Watch and Immediate Windows.
  • The Error List has been rewritten to support filtering on any column. We’ve made the Error List scalable enough to show you a live view of errors, warnings and code analysis across your entire C# or VB solution as you type, even when a code change produces thousands of warnings.
  • You can get live code analysis and automatic fixes as you type, with specific code-aware guidance for the Microsoft platforms and NuGet packages that you’re targeting.

ASP.NET 5

ASP.NET 5 is the new Web stack for .NET. It unifies MVC, Web API and Web Pages into a single API called MVC 6. You can create ASP.NET 5 apps in Visual Studio 2015 Preview. You can also try the more command-line-oriented approach, by checking out the ASP.NET home repo, to build apps on Windows, Linux or Mac.

ASP.NET 5 has the following overall characteristics. That’s a lot.

  • ASP.NET MVC and Web API, which have been unified into a single programming model.
  • A no-compile developer experience.
  • Environment-based configuration for a seamless transition to the cloud.
  • Dependency injection out-of-the-box.
  • NuGet everything, even the runtime itself.
  • Run in IIS, or self-hosted in your own process.
  • All open source through the .NET Foundation, and takes contributions in GitHub.
  • ASP.NET 5 runs on Windows with the .NET Framework or .NET Core.
  • .NET Core is a new cloud optimized runtime that supports true side-by-side versioning.
  • ASP.NET 5 runs on OS X and Linux with the Mono runtime.

We’ve updated the ASP.NET 5 developer experience with each Visual Studio 2015 CTP. You can read the details of the experience in Visual Studio Preview ASP.NET blog post. The following are some highlights.

ASP.NET 5 is now integrated into the “One ASP.NET” new project experience.

clip_image012

ASP.NET 5 supports running on both the .NET Framework and .NET Core. IntelliSense has been expanded to provide extra information where the BCL APIs differ. .NET Core is intentionally smaller, in order to provide additional deployment benefits.

clip_image014

Dependencies node for Bower and NPM dependencies

ASP.NET projects now integrate Bower and NPM into solution explorer, under a new dependencies node. You can uninstall a package through the context menu command, which will automatically remove the package from the corresponding JSON file.

clip_image015

Entity Framework

Entity Framework 6.x This release includes the EF6.1.2-beta1 version of the runtime and tooling. EF6.1.2 is mostly about bug fixes.

The Entity Framework 6.1.2 runtime is included in a number of places in this release.

· The runtime will be installed if you create a new model using the Entity Framework Tools in a project that does not already have the EF runtime installed.

· The runtime is pre-installed in new ASP.NET projects, depending on the project template you select.

Entity Framework 7 EF7 is a lightweight and extensible version of EF that enables new platforms and new data stores. You can read more about EF7 in a recent EF7 – New Platforms, New Data Stores blog post. For more information about getting started with early previews of EF7, see our getting started page.

This release includes an early preview of the EF7 runtime that is installed in new ASP.NET 5 projects. This build of EF7 implements basic functionality and there are a number of limitations with the features that are implemented. Please bear in mind that this preview is designed to give you an idea of what the experience will be like and you will quickly hit limitations if you deviate from the code from the default project template.

Nuget Package Manager

The Nuget Package Manager has been rewritten using the tool window style and can be viewed per project and solution. Each project can open a NuGet Package Manager window at the same time. This change applies to all type of projects that uses Nuget Package Manager. It’s also a lot nicer to look at.

clip_image017

Closing

.NET 2015 Preview and Visual Studio 2015 Preview include many new enhancements that should help you in ever day development. .NET Framework 4.6 is the next update for building Windows desktop and server and cloud apps. The WPF, RyuJIT and ASP.NET 5 updates are likely welcome improvements for many of you.

The open source and cross-platform announcements for .NET Core 5 enable new scenarios and new community engagement. We’re excited to contribute .NET Core 5 to the .NET Foundation. It is great to see the .NET Foundation growing, with community and Microsoft projects.

As always, please share your feedback in the comments. We want to know what you think about the new releases and the .NET Core 5 open source and cross-platform news.

Category
.NET

Author

.NET is the free, open-source, cross-platform framework for building modern apps and powerful cloud services.

0 comments

Discussion are closed.