Reputation: 1446
I developed a net core class library using Net Core "1.0.0-preview2-003131" version. Currently using VS2015. But as this should be released soon, I want to move it to "1.0.1". I installed this update: .NET Core 1.0.4 (https://github.com/dotnet/core/releases/tag/1.0.4)
When I change the version in my global.json I get this error:
Severity Code Description Project File Line Suppression State Error MSB4019 The imported project "C:\Program Files\dotnet\sdk\1.0.1\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
So I read that doing "dotnet migrate" it changes my project from xproj to csproj, and the problem should be solved.
But doing that, my csproj doesn't load properly, showing error:
The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format.
Upvotes: 1
Views: 1822
Reputation: 26823
You need to upgrade to Visual Studio 2017 to use the csproj format that dotnet-migrate generates. .NET Core CLI does not support xproj or project.json.
Or, you can use Visual Studio Code with the C# extension on either project.json or csproj projects, but not both.
Upvotes: 2