1
votes

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.

1
you need to upgrade your aspnetcore version on package.json - Ahmar
To migrate you'll need Visual Studio 2017: docs.microsoft.com/en-us/dotnet/articles/core/migration - trydis
@ahmar I have no package.json and this is a class library, not an asp net core project - Jawen
@trydis mmm is there a way of using an official release of net core in VS2015? - Jawen
Forget about VS2015. If you cannot get VS2017, use Visual Studio Code. - Lex Li

1 Answers

2
votes

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.