Visual Studio 2015 target framework "dotnet" vs "net452"
Asked Answered
R

2

8

When creating a new Visual Studio 2015 class library (package) project, one is able to set multiple target frameworks.

What is the difference between dotnet and net452?

project.json:

"frameworks": {
  "dotnet": { },
  "net452": {}
}

Project layout:

Target Frameworks

Roose answered 28/7, 2015 at 12:7 Comment(0)
A
5

dotnet: The new .NET Core for packages that don’t have any app model requirement, this is the runtime. (You could also use use dnx or dnxcore for example)

net452: This need to be referenced if you want something that is only part of the full .net framework.

Oren Novotny has a great blog post explaining it.

Alvaalvan answered 28/7, 2015 at 12:42 Comment(0)
F
2

I cannot answer to the previous answer from thllbrg (which is roughly right ... Also Oren blog post is the most important source at the current time), but one important clarification: dotnet does not have a runtime.

Libraries build with dotnet can deploy the DNX, .Net Framework and the UWP platforms (if the dependencies of your libraries allow so). All have different CLRs and compilation models. DNX e.g. support compilation on the fly, while UWP compiles ahead of time into one file and does tree shaking (the killing of not used functions in your library).

Feinberg answered 12/8, 2015 at 7:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.