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?
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
ornet46
)UPDATE 2 (Dec 9, 2015)
Somewhat official docs are now available from dotnet. See .NET Platform Standard → NugetFor 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.