/ .NET

.NET Frameworks, Cores, Standards

.NET Framework is well-known software development platform and run-time. It includes libraries and tool-chain for building feature-reach applications for Windows OS. It exists for more than a decade and does not require a long introduction.

.NET Core is a recent initiative from Microsoft[1]. This is cross-platform, open source, and well-supported subset of .NET Framework with development tool-chain that allows developers to write command line (service) applications. The official guide recommends to use .NET Core for server applications unless you have a dependency (like platform, technology or library) that does not work well with .NET Core[2]. It is also recommended to continue developing existing .NET Framework applications rather than migrate them .NET Core. The current version is .NET Core 1.1. The preview of .NET Core 2.0 is available.

.NET Standard is a specification[3]. It defines a set of interfaces, classes, their properties and methods. It is a written document, not a program code or library. .NET Core, .NET Framework and Mono implements this specification so the code written for one of the platform can be used in another as long as it uses APIs defined in the particular version of the .NET Standard. The current version is 1.6. The upcoming .NET Standard 2.0 will be released with .NET Core 2.0.[4]

Software development analogy is that .NET Standard defines interface and .NET Core and .NET Framework provide implementation, where latter has much more classes and tools that former.

Both .NET Core and .NET Framework contain more than implementation of .NET Standard. There are some limitations on referencing .NET Core projects by .NET Framework projects and vise-versa. For example, .NET Core projects cannot be referenced by the .NET Framework projects. Attempt doing so in Visual Studio 2017 results with compilation error (which might be improved in one of the future releases[5]):

error : Project 'ClassLibrary1.csproj' targets '.NETCoreApp,Version=v1.1'. It cannot be referenced by a project that targets '.NETFramework,Version=v4.6.2'.

Although .NET Standard is a specification, it is possible to create a .NET Standard class library in Visual Studio [6]. In this case the library can only use APIs (interfaces, classes, etc) defined in the particular version of the standard and cannot use any .NET Core or .NET Framework specific APIs. The library will be build with exiting compiler and tool-chain and output library can be referenced by both .NET Core and .NET Framework projects.

  1. Announcing .NET Core 1.0, https://blogs.msdn.microsoft.com/dotnet/2016/06/27/announcing-net-core-1-0/ ↩︎

  2. Choosing between .NET Core and .NET Framework for server apps, https://docs.microsoft.com/en-us/dotnet/articles/standard/choosing-core-framework-server ↩︎

  3. .NET Standard, https://docs.microsoft.com/en-gb/dotnet/articles/standard/library ↩︎

  4. .NET Core Roadmap, https://github.com/dotnet/core/blob/master/roadmap.md ↩︎

  5. Referencing .NET Core project to the regular .NET csproj, https://github.com/dotnet/corefx/issues/6124 ↩︎

  6. What is the difference between .NET Core and .NET Standard Class Library project types?, http://stackoverflow.com/questions/42939454/what-is-the-difference-between-net-core-and-net-standard-class-library-project ↩︎

Alex Netkachov

Alex Netkachov

Alex Netkachov is a Senior Software Developer, currently working in Central London on new generation of energy trading solutions for brokers, traders and exchanges.

Read More

Why not to stay updated if the subject is interesting? Join Telegram channel Alex@Net or follow alex_at_net on Twitter. Or just, use the comments form below.