What frameworks are available in ASP.NET Core (ASP.NET 5) applications?

14.9k views Asked by At

I have seen various frameworks targeted in project.json files, using names such as netcore50, dotnet, dnx451, net45, and others. The documentation for the "framework" section project.json does not (yet) specify how to use this section for different frameworks.

What frameworks are available and what name should be used in project.json to target each?

2

There are 2 answers

1
natemcmaster On BEST ANSWER

UPDATE 3

Full list see Target Frameworks.

The most common TFMs ASP.NET app developers need to know are:

  • netcoreappx.y = An application that targets .NET Core x.y (e.g. netcoreapp1.0 = .NET Core 1.0)
  • netstandardx.y = A library that targets .NET Standard x.y. (e.g. netstandard2.0 = .NET Standard 2.0). .NET Standard libraries can work on desktop .NET, Windows Phone, Mono, and others.
  • net4xy = A library or console app that targets desktop .NET Framework 4.x.y (e.g. net452 or net46)

UPDATE 2 (Dec 9, 2015)

Somewhat official docs are now available from dotnet. See .NET Platform Standard → Nuget

For libraries targeting multiple platforms that adhere to the .NET Standard, these TFMs (target framework monikers) are available.~

UPDATE (Aug 12, 2015)

This Nuget blog post shows additional TFMs available for nuget. It also explains the dotnet TFM.

Original response

Although this is not official documentation, this blog post by Oren Novotny has an excellent table showing the different target framework monikers.

4
Gerald Davis On

As of right now there are only two three with any package support.

.Net Framework 4.5.1 = dnx451 .Net Framework 4.5.2 = dnx452 .Net Core 5.0 = dnx50

.NET Framework 4.6.0 (dnx46) will be released in the near future.

Still it depends on what you mean by 'available'. Anyone could release a new framework is they wanted to, that cat is now out of the bag. However by default dnu uses the project.json to find dependencies by looking at the main feed on nuget.org. Right now on nuget.org those are the only dnx framework dependencies.

For example take a look at the microsoft.aspnet.mvc nuget page: https://www.nuget.org/packages/Microsoft.AspNet.Mvc/6.0.0-beta4

Dependencies

DNX 4.5.1
Microsoft.AspNet.Authorization (≥ 1.0.0-beta4)
Microsoft.AspNet.Cors (≥ 1.0.0-beta4)
Microsoft.AspNet.Mvc.Razor (≥ 6.0.0-beta4)
Microsoft.Framework.Caching.Memory (≥ 1.0.0-beta4)

DNXCore 5.0
Microsoft.AspNet.Authorization (≥ 1.0.0-beta4)
Microsoft.AspNet.Cors (≥ 1.0.0-beta4)
Microsoft.AspNet.Mvc.Razor (≥ 6.0.0-beta4)
Microsoft.Framework.Caching.Memory (≥ 1.0.0-beta4)

Edit: there also was a aspnet50 and aspnetcore50 in earlier beta versions but they have been deprecated and should be replaced with dnx451 and dnxcore50 respectively.