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:
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.
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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With