UPDATED! .NET Core 2.0 was officially released 8/14/2017!
So, what is changing with .NET Core 2.0?
1. .NET Standard 2.0 Expanded APIs & the Ability to Reference Full Framework Libraries
.NET Standard broadens the set of APIs available to include a lot of the missing features. It now supports 32,000+ APIs. It is now much easier to port your code to a .NET Standard library without major code changes.
One of the biggest problems with .NET Core was the lack of third-party libraries. For example, when 1.0 came out, popular logging libraries like log4net were not even available (it is now). However, this was really only a problem if you wanted to deploy your app on Mac or Linux. You could have used .NET Core and targeted full .NET framework and not had these issues.
.NET Standard 2.0 has added a new compatibility shim that will enable any .NET Core app to reference any full framework library.
Of course, this will only work for cases where the .NET Framework library uses APIs that are available for .NET Standard. That’s why this isn’t the preferred way of building libraries you intend to use across different .NET platforms. However, this compatibility shim provides a bridge that enables you to convert your libraries to .NET Standard without having to give up referencing existing libraries that haven’t been converted yet.
Also check out this great blog post: .NET Standard 2.0 – Making Sense of .NET Again
2. Expanded OS Support
One of the big goals with .NET Core is portability across multiple operating systems. Including desktops, servers, and even mobile. Microsoft and the community continue to expand the support of .NET Core.
Linux is now treated as a single operation system instead of different distribution. This also holds true for Windows and macOS. For example, there are no individual runtimes any longer for win8 and win10.
A preview is also now available for ARM32 support.
3. ASP.NET Core Razor Pages Are New
ASP.NET now supports razor syntax based pages, called Razor Pages. You can now essentially create a razor view without a controller. Although, you can make a class that inherits from PageModel which is basically a controller and model class dedicated to that page. I could see this being useful in some cases and could help with breaking down big complex controllers.
How do Razor Pages compare to MVC? Check out our article!
4. Visual Basic for .NET Core Is Here!
OK, I’m sure you are really excited about this! Visual Beginners All-purpose Symbolic Instruction Code now supports .NET Core! Currently, it is limited to making class libraries and console application. They say more is coming soon.
Other Recent .NET Core 1.1 Changes with Visual Studio 2017
Just in case you missed what changed in .NET 1.1, here were some of the highlights. These changes also apply if you are comparing .NET Core 1.0 to 2.0 and never made the switch to Visual Studio 2017 and .NET Core 1.1.
1. xproj Project Files Replaced by New Version of csproj
One of the biggest differences with .NET Core was the new project files. Visual Studio used xproj and project.json files instead of the traditional csproj. The new project file format was much simpler but didn’t work with some other .NET tools like msbuild. The new csproj is supposed to include a lot of the benefits learned from the xproj experiment.
2. MSBuild Works Again
This is a big deal and was a big problem for us at Stackify. Our build process for Prefix used MSBuild and Installshield to package it up for deployment. By switching to xproj, all of that was broken. Getting MSBuild support back will be much appreciated for those that already have a lot of existing build and deployment processes in place.
3. Visual Studio 2017 – Tooling Enhancements
Now that project.json is gone, how you do multi-targeting of frameworks and the Visual Studio UI around references and dependencies has completely changed in Visual Studio 2017.
To do multi-targeting you now have to manually edit the csproj file and things can get a little weird. The good news if you are only targeting one framework, you can easily do it within the project properties. Multi-targeting has been relegated to an advanced use case I guess with poor UI support for it.
By the way, one of the other big advantages of Visual Studio 2017 is how easy it is to install. Microsoft spent an enormous amount of time trying to streamline and improve the installation experience. Check out the Microsoft docs site to learn more about the changes and new features of VS 2017.
- Retrace Now Integrates with Axosoft: Track Errors and Save Time Fixing Bugs - November 14, 2017
- Build It, Buy It, or Open Source: The Software Dilemma - November 14, 2017
- Top ASP.NET Performance Counters and How to Monitor Them - November 13, 2017
- How to Use Performance Counters with .NET Core: Current Solution, Alternatives, and the Future - November 7, 2017
- Top 13 ASP.NET Core Features You Need to Know - October 31, 2017