Introducing .NET Core 1.0 RTM

Today, the Microsoft .NET team announced the general availability of the RTM version of .NET Core 1.0, ASP.NET Core 1.0 and Entity Framework Core 1.0. Go to the .NET Core website to get started.

Although this RTM release is a major milestone in the .NET Core roadmap, it does not contain a lot of new stuff compared to the RC2 release.

Tooling

Although the .NET Core runtime and libraries are RTM, the tooling for building .NET Core applications is still in preview. These include:

  • .NET Core CLI
  • Visual Studio Tools for .NET Core
  • Visual Studio Code extension for .NET Core

Before installing the Visual Studio tools for .NET Core, make sure you install Visual Studio 2015 Update 3.

Documentation

With this RTM release, also a brand-new .NET documentation site has been launched (https://docs.microsoft.com/dotnet). Besides specific documentation on .NET Core, this site also contains more general documentation on .NET concepts, C#, F#, Visual Basic.

What’s new in RTM?

Version 1.0.0

First thing that obviously stands out when you start working with the RTM bits, is the version-number of all the libraries. If you search for a .NET Core library in the NuGet package-gallery, you will find that all packages now have version 1.0.0 in stead of the pre-release RC2 versions they had until today (e.g. 1.0.0-rc2-final):

Mutiple code generation types in the .NET Core CLI

In previous versions of the .NET Core CLI tooling, it was possible to create a very simple console application using the dotnet new command. With the RTM release, you can now specify one of the following application types using the -t <type> or --type <type> argument:

  • Console application – simple console application
  • Web – a simple web application
  • Lib – a class library
  • XUnitTest – an XUnit based unit-test project

Although dotnet new provides some quick-start templates out-of-the-box, you should check out the ASP.NET Core generators for Yeoman for some more scaffolding power. Besides being able to generate a complete project structure for several .NET Core application-types for you, they also offers sub-generators for generating additional stuff like: classes, MVC controllers, MVC Views, Angular Controllers, and many more.

Self-contained applications

.NET Core offers different ways of deploying your app: as a portable app or as a self-contained app. A portable app expects the .NET Core runtime and libraries to already be present on the machine the app is deployed to.

A self-contained app is (as the name implies) fully self-contained and can be deployed to a machine that doesn’t have .NET Core installed. It does however need the correct native dependencies for running .NET Core applications. This differs per platform off-course. If you want to know the core dependencies for Linux for instance, look at the Docker file for the 1.0.0-core-deps Docker image that is available on Docker Hub.

With the RTM release the way you create a self-contained app is slightly different than with the RC2 bits. To make an app self-contained, change the dependencies section in your project.json. Remove the following part:

“Microsoft.NETCore.App”: {
“type”: “platform”,
“version”: “1.0.0”
}

and replace this with:

“NETStandard.Library”: “1.6.0”,
“Microsoft.NETCore.Runtime.CoreCLR”: “1.0.2”,
“Microsoft.NETCore.DotNetHostPolicy”: “1.0.1”

Also add a runtimes section for all the runtimes that you want to build your app for:

“runtimes” : {
“win10-x64”: {},
“ubuntu.14.04-x64” : {}
}

Now you can do a dotnet publish -c release -f netcoreapp1.0 -r <runtime identifier> to create a self-contained application for the specified runtime:

API changes

Several new API’s are added in the RTM release. Some important additions are:

  • System.IO.FileSystem.Watcher – FileSystemWatcher.WaitForChanged
  • System.Reflection.Context
  • System.Security.SecureString

For a complete list of API changes in thr RTM release see the API Diff between RC2 and RTM.

.NET Core tools telemetry

The .NET Core CLI now contains a feature that collects usage telemetry. Microsoft claims no sensitive data will be collected. This feature is enabled by default. In case you don’t want any usage telemetry is recorded, set an environment variable named DOTNET_CLI_TELEMETRY_OPTOUT with the value true.

WCF Improvements

Support for a subset of the Windows Communication Foundation (WCF) framework was already available in earlier releases of .NET Core. This is only the client side stack (for consuming WCF services). In the RTM release, some of the most important updates for WCF are:

  • Better performance with as result increased throughput for several communication transports.
  • Improved reliability of several communication transports.
  • Better certificate support for security on different platforms.

Also an update of the WCF Connected Service extension for Visual Studio (preview) is released. This extension can be used to generate a proxy for a WCF service in a .NET Core project.

See the documentation for more in-depth information.

Offline support

The .NET Core libraries are cached locally the first time you use the .NET Core CLI. This means that you don’t have to be connected to the Internet when building applications that only target the .NET Core runtime and libraries.

Taking it to production

With this being an RTM release, you can now start using .NET Core in production, with full support from Microsoft. But keep in mind that the tooling is still in preview and will most definitely change before becoming RTM. One of the upcoming changes will be the announced switch from the project.json format to the MSBUild based .csproj format for project files.

If you start working with the RTM release, make sure you also check out the release notes and the known issues list.

Let’s build stuff!

I hope you’re as exited as I am about .NET Core and the new possibilities this “new .NET” offers us. Let’s build some great applications with it!