- Delete the csproj file.
- Rename the Package.config to Project.json.
- Transform the file to convert the XML to JSON format.
<?XML version= "1.0" encoding= "Utf-8"?><Packages> < PackageID= "Newtonsoft.json"version= "8.0.3"targetframework= "net451" /> < PackageID= "Somecoolpackage"version= "3.0.1"targetframework= "net451" /></Packages>
After conversion
{ "dependencies": { "somecoolpackage": "3.0.1", "Newtonsoft.json": "8.0.3" }, " Frameworks ": { " net45 ": { } }, " runtimes ": { " win ": {} }}
- Perform dotnet restore
- Perform dotnet Build
- You may encounter an error and try to add a reference to Frmework
{ "dependencies": { "somecoolpackage": "3.0.1", "Newtonsoft.json": "8.0.3" }, " Frameworks "" Net45 ": { " frameworkassemblies ": { " System.Runtime.Serialization ":" 4.0.0.0 ", } } }, " runtimes ": { " Win ": {} }}
- Open Visual Studio and add an existing project.
Convert a Visual Studio project to a dot Net core project csproj to Xproj