The Next Generation of .NET
At Build 2014 this week, we announced the next generation of .NET. The next generation will focus and deliver on two main themes: Core Innovation and cross-device apps. These themes are a direct result of your feedback, asking for new features in .NET and to make it easier to use .NET for all your apps.
At Build 2014, we are releasing:
- .NET Native
- The .NET Compiler Platform (“Roslyn”)
- CTP3 of our next generation JIT, “RyuJIT”, including SIMD support
- Unification of Portable Class Libraries and Class Library in Visual Studio 2013 Update 2
- Performance and Diagnostics hub improvements in Visual Studio 2013 Update 2
- .NET Mobile services
- Project “Orleans”
The .NET team has been building new technologies that extend the core capabilities of .NET and fundamentally improve the user experience of your apps. At Build, we’ve announced .NET Native, Next generation JIT and SIMD. Those technologies focus on taking better advantage of hardware and specific CPU instructions that improve app performance.
We’ve made sure that .NET is a great technology for cross-device app development, in concert with the community and partners. This also includes improving portable class libraries and ensuring that our NuGet packages work well on Xamarin platforms.
Many of those .NET libraries are open source, including from Microsoft. We’re going to do more to work with open source developers. You will want to learn more in Soma’s blog post on the .NET Foundation, which is new organization that is intended to foster open development around the growing collection of open source technologies for .NET.
We’re sharing preview releases of multiple technologies that show you where the next generation of .NET is headed. Please download and try out these releases. We need your feedback before we release these technologies as fully supported .NET features.
Looking back, we released the .NET Framework 4.5.1 late last year. We are happy to let you know that .NET 4.5.1 is now on 350 million machines! Many of you have started taking advantage of the new features that we added in 4.5.1, and end-users are benefiting from the performance improvements.
We’re thrilled to announce the first release of .NET Native. Windows Store apps start up to 60% faster with .NET Native and have a much smaller memory footprint. Our first release is a Developer Preview that allows you to develop and test apps with this new compiler. This preview release of .NET Native offers you the performance of C++ with the productivity of C#. .NET Native enables the best of both worlds! See yesterday’s .NET Native announcement.
.NET Compiler Platform (“Roslyn”)
The .NET Compiler Platform (“Roslyn”) provides open-source C# and Visual Basic compilers with rich code analysis APIs. You can build code analysis tools with the same APIs that Microsoft is using to implement Visual Studio! To learn more see the C# Roslyn announcement post or the VB Roslyn announcement post.
You can use .NET to target mobile and cloud platforms. We’ve been working to make that experience even better, generally and in Visual Studio Update 2. The following examples show how .NET cross-device development keeps on improving.
- We’ve enabled new Portable Class Libraries (PCL) capabilities for Windows Universal Apps.
- We’ve worked closely with Unity and Xamarin to enable you to be successful building cross-device apps.
- As part of that, we’ve shared our .NET BCL test suite with Unity and Xamarin, to validate the behavior of their .NET implementations.
- We’ve also enabled anyone to build great support for PCL on any platform. Xamarin supports PCL in their tools, including validating PCLs that the .NET team ships via NuGet (ex: ImmutableCollections), with a test suite that we shared for our PCLs.
- The community is also very active in cross-platform development too, making many .NET libraries available as PCLs, so that they can be used on Windows, iOS and Android.
RyuJIT made a big splash when it debuted last October. RyuJIT CTP1 offered 2X throughput relative to the existing 64-bit JIT compiler and set up our team with a platform that’s suitable for innovation and rapid development. A few weeks ago we released RyuJIT CTP2, giving you the performance and reliability you need to try out RyuJIT on your day-to-day workloads.
We’re happy to announce RyuJIT CTP3, showcasing the customer-facing innovations made possible with a modern JIT compiler. RyuJIT CTP3 is able to produce SIMD instructions (e.g., SSE2) when you compile with our SIMD library on NuGet. By using the SIMD libraries along with CTP3 of RyuJIT, .NET developers can now enjoy the performance boost offered by SIMD instructions available in modern processors, especially useful for numerical computing, gaming and image processing applications.
Evaluating RyuJIT CTP3 and SIMD
You can download the RyuJIT CTP3 installer. RyuJIT currently only works on 64-bit editions of Windows 8.1 or Windows Server 2012 R2. Because we want you to be able to test out RyuJIT easily the installer doesn’t affect NGen or the system registry. After installation, there are two ways to turn on RyuJIT. If you just want to enable RyuJIT for one application, set an environment variable: COMPLUS_AltJit=*. If you want to enable RyuJIT for your entire machine, set the registry key HKLM\SOFTWARE\Microsoft\.NETFramework\AltJit to the string “*”. Both methods cause the 64-bit CLR to use RyuJIT instead of JIT64. And both are temporary settings—installing RyuJIT doesn’t make any permanent changes to your machine (aside from installing the RyuJIT files in a directory). The SIMD libraries are available through NuGet.
Send feedback and questions to email@example.com
Code Reuse & Portable Class Libraries
Sharing code can be challenging. But don’t worry: with Visual Studio Update 2 we’ve made significant improvements to the way you can share code.
You now have two options for sharing:
- Sharing Source Code. With Update 2 you’ll get a brand new feature called Universal Apps that allows you to share source code and assets.
- Sharing a Binary. This is portable class libraries as you know and love it but with Update 2 we’ve made it a whole lot better. For instance, you can now call WinRT APIs.
We are going to continue to look for ways to make sharing code easier and would appreciate your feedback.
For more details on the new Universal Apps feature: stay tuned. There is an upcoming Visual Studio post that explains the ins & outs. In this post, we’ll cover the improvements we’ve made to portable class libraries.
Supported in Express
First of all: we’re happy to announce that starting with Update 2, portable class libraries are now also made available in Visual Studio Express for Windows.
Available set of .NET and WinRT APIs is bigger than ever
We’ve heard your feedback around API convergence loud and clear. As a result, the new Windows Store 8.1 and Windows Phone 8.1 platforms have started to converge a lot more. That means you will be able to use almost all of Windows Store 8.1 and Windows Phone, WinRT, and .NET APIs from portable class libraries. That’s right – portable class libraries can now consume all the WinRT APIs that both our Store platforms have in common.
.NET has a great set of APIs available, on the .NET desktop and other platforms. We’ve heard feedback that it is challenging to re-use existing .NET code in Windows Store apps, because it doesn’t include core APIs such as File. We are looking at making more APIs available that would make this easier. We would love to hear your feedback, specifically about the APIs you want added.
Expose your PCLs to WinRT
For the first time, you can now share UI via portable class libraries. This is possible because both Windows Store and Windows Phone use the same WinRT XAML stack. This includes being able to use the XAML designer in portable class libraries.
Less pressure in the New Project Dialog
Today, the New Project Dialog is where you have to make the decision whether you want to target a single platform or multiple platforms. Depending on the answer, you either create a regular, platform specific class library or a portable class library. Needless to say that requirements can often change over time. Previously there was no way to adjust this decision later – you had to start over.
With Update 2 we’ve removed this friction for Windows Store and Windows Phone class libraries: class libraries for both platforms have the same experience for retargeting as portable class libraries. This means you can convert any store class library into a portable class library by just ticking another checkbox in the Change Targets dialog. The reverse is also true: any portable class library can be reduced to target just Windows Store or just Windows Phone.
This is super useful for reusing existing Windows Store 8.1 class libraries on Windows Phone 8.1. Given the amount of convergence, making them a portable class library will work in majority of cases without any changes.
Performance and Diagnostics hub improvements in Update 2
In VS2013 RTM we introduced the Performance and Diagnostics hub with a bunch of tools that help you diagnose issues during your Windows Store app development. With VS2013 Update 2 we added two brand new tools: CPU Usage, and Memory Usage. We also made all the tools in the Performance Diagnostics hub applicable to Windows Phone 8.1 development.
It’s also worth highlighting here the addition of the JSON Debugger Visualizer to Update 2.
.NET Mobile Services
With Visual Studio 2013 Update 2 RC, we’ve added support for .NET Mobile Services backend projects. You can now create a Mobile Service project (which uses the ASP. NET Web API framework) from Visual Studio, add scaffolds to it, debug it locally, publish it to Azure, and finally remote debug it. It’s all the Mobile Services goodness, but with the familiarity of .NET. To learn more about .NET Mobile Services in Visual Studio, check out Scott Gu’s blog post that covers Mobile Services .NET support from earlier today.
Project “Orleans” is an implementation of the Actor design pattern. This pattern is particularly well suited for gaming, Internet of Things, social networks, and other scenarios with complex and dynamic relationships. The Halo 4 team took advantage of Project “Orleans” to build some of their backend services.
We’d appreciate you downloading the preview, trying it out and telling us about your experience using this design pattern.
.NET 4.5.1 delivers a lot of value and has been widely deployed since its release in October. This week we’ve provided previews around our compilers and JIT and shipped updates to our developer experiences around class libraries and Azure. We’re excited to be delivering value at this cadence and can’t wait to see what you do with these new capabilities.
We’ve made a lot of preview bits available this week at //build and are looking forward to hearing back from you about them. The best places are UserVoice, Visual Studio Connect and the comment to this post. We’re also listening on Twitter and Facebook.