-
Notifications
You must be signed in to change notification settings - Fork 81
Open
Labels
Milestone
Description
What is it?
These are a new, simpler way of targeting versions of .NET. More information here https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/standard-platform.md
Action required
For RC1 applications and test projects should still target dnx4x and dnxcore50 and don't need to change at all. Anything that has a Program.Main or Startup.cs is considered an application.
Only _class libraries_ should change to target net4x and dotnet5.x. For class libraries the recommended conversion steps are:
In project.json:
- Change
dnx4xtonet4x(e.g.dnx451tonet451) - Change
dnxcore50todotnet5.4
And in your CS files:
- Change
#if DNX451to#if NET451 - Change
#if DNXCORE50to#if DOTNET5_4
Example
Here's what a project.json file used to look like:
{
"version": "1.0.0-*",
"frameworks": {
"dnx451": { },
"dnxcore50": {
"dependencies": {
"System.Collections": "4.0.11-beta-*"
}
}
}
}And here's what to change it to:
{
"version": "1.0.0-*",
"frameworks": {
"net451": {},
"dotnet5.4": {
"dependencies": {
"System.Collections": "4.0.11-beta-*"
}
}
}
}And in your CS files if you had:
#if DNX451
// whatever
#endif
...
#if DNXCORE50
// whatever
#endif Change that to:
#if NET451
// whatever
#endif
...
#if DOTNET5_4
// whatever
#endif