Closed
Description
This steps will get you on the success path of migrating a csproj to xproj using framework net451
.
1 Delete csproj file.
2 rename package.config to project.json
3 edit project.json as follows:
Imagine you have this content:
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net451" />
<package id="SomeCoolPackage" version="3.0.1" targetFramework="net451" />
</packages>
Update it so it became:
{
"dependencies": {
"SomeCoolPackage": "3.0.1",
"Newtonsoft.Json": "8.0.3"
},
"frameworks": {
"net45": {
}
},
"runtimes": {
"win": { }
}
}
- run dotnet restore
- run dotnet build
You may find some errors, for example missing some framework assemblies.
Take note of which assemblies are missing and add them as follows:
{
"dependencies": {
"SomeCoolPackage": "3.0.1",
"Newtonsoft.Json": "8.0.3"
},
"frameworks": {
"net45": {
"frameworkAssemblies": {
"System.Runtime.Serialization": "4.0.0.0",
}
}
},
"runtimes": {
"win": { }
}
}
DONE. ;) Enjoy the new world.
Metadata
Metadata
Assignees
Labels
No labels