Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is .NET Core an "Implementation" of .NET Standard?

I'm still pretty confused about how .NET Core and .NET Standard relate to each other.

From what I understand, .NET Standard is an interface definition (not dissimilar in the way the Katana is an implementation of OWIN). .NET Framework will implement versions of .NET Standard.

Is this correct so far?

.NET Core bundles up its dependencies inside it. Those dependencies will use the .NET Standard interface's implementation. That may be the .NET Framework, Mono or something else.

ASP Core is .NET Core with "Web" stuff referenced. Pretty much just a Visual Studio template in the sense that it can all by built up from a .NET Core console application.

Am I still close to on track?

Finally, if I can creating a new, green-field application then .NET Core should be the favoured technology (assuming that I don't need any of the .NET Framework only assemblies).

Last question, can I reference .NET Framework assemblies in the GAC from a .NET Core project?

Cheers

like image 228
BanksySan Avatar asked Jun 19 '17 19:06

BanksySan


People also ask

Does .NET standard include .NET Core?

. NET Core is an implementation of the . NET Standard that's optimized for building console applications, Web apps and cloud services using ASP.NET Core. Its SDK comes with a powerful tooling that in addition to Visual Studio development supports a full command line-based development workflow.

What is the difference between .NET Core and .NET Framework and .NET standard?

. Net Core does not support desktop application development and it rather focuses on the web, windows mobile, and windows store. . Net Framework is used for the development of both desktop and web applications as well as it supports windows forms and WPF applications.

Is .NET Core and .NET Framework the same?

NET Framework to create Windows desktop and server-based applications. This includes ASP.NET web applications. On the other hand, . NET Core is used to create server applications that run on Windows, Linux and Mac.

Does .NET 6 implement .NET standard?

According to this document, . NET 6 supports . NET Standard 2.1.


3 Answers

My understanding is that the .NET Core is implementing the .NET Standard.

So .NET Standard is more like a specification and .NET Core is an actual framework which implements that specification.

.NET Standard is also implemented by other frameworks like as .NET Framework or Xamarin (and ASP.NET Core which is built on the top of .NET Core).


Here is offficial explanation:

How is .NET Standard different from .NET Core?

.NET Standard is a specification that covers which APIs a .NET platform has to implement.

.NET Core is a concrete .NET platform and implements the .NET Standard.


.NET Standard:

The .NET Standard is a formal specification of .NET APIs that are intended to be available on all .NET runtimes.

The various .NET runtimes implement specific versions of .NET Standard.


Introducing .NET Standard:

.NET Standard is a set of APIs that all .NET platforms have to implement. This unifies the .NET platforms and prevents future fragmentation.

.NET Standard 2.0 will be implemented by .NET Framework, .NET Core, and Xamarin. For .NET Core, this will add many of the existing APIs that have been requested.


Introducing .NET Core:

.NET Core is essentially a fork of the NET Framework

Another way to look at it: The .NET Framework has essentially two forks. One fork is provided by Microsoft and is Windows only. The other fork is Mono which you can use on Linux and Mac.


For more details please read:

  • .NET Standard FAQ
  • .NET Standard (The table lists all versions of .NET Standard and the platforms supported)
  • Introducing .NET Standard
  • Introducing .NET Core
like image 178
Lukasz Mk Avatar answered Oct 06 '22 08:10

Lukasz Mk


  1. Yes, .NET Core is a platform / runtime that implements a version of .NET Standard.

If you build a library that targets a version of .NET Standard, it can be used on any runtime that implements this or a higher version of .NET Standard. This applies to .NET Core as well as mono (=> Xamarin), UWP (.NET Native) and .NET Framework.

  1. The detail of distribution doesn't really matter.. technically .NET Core < 2.0 relies on the way NETStandard.Library is built but that is changing for 2.0.

  2. ASP.NET Core is "just" a set of libraries and tooling atop a version of .NET Standard (pre 2.0 also a version of .NET Framework) that it requires to run on. This means you can build ASP.NET Core applications for both .NET Core and .NET Framework - potentially even other runtimes if they support the required level of .NET Standard.

  3. For new projects, it makes sense to evaluate what your needs are. .NET Core has a different servicing policy than .NET Framework and .NET Framework still has components and API that aren't going to be included in .NET Core - for example WinForms and WPF.

    For new library projects, it makes sense to target .NET Standard instead of .NET Framework wherever possible to ensure reusability in more types of projects.

like image 31
Martin Ullrich Avatar answered Oct 06 '22 10:10

Martin Ullrich


Simple answer is yes:

.NET Core implements the .NET Standard Library, and therefore supports .NET Standard Libraries.

And ASP.NET Core built on .NET Core.

But: this does not mean that all ASP.NET Core apps support .NET Standard. ASP.NET Core apps can run on .NET Core or on the full .NET Framework. If an app has the full .NET Framework as a target platform it may have dependencies on libraries, that don't support .NET Standard.

like image 4
Set Avatar answered Oct 06 '22 10:10

Set