Paolo Vigori
Paolo Vigori

Reputation: 1724

How to use csproj files created with dotnet migrate in Visual Stuidio 2015?

I created a c# (.net core) project in Visual Studio to be able to run it on Linux. Then I setup my linux box to run .net core apps and found out that dotnet restore didnt work because of xproj files but luckyly I could run dotnet migrate that created a csproj files instead and so I was able to build and run on Linux. Now I want to make some changes using Visual Studio 2015 and I discovered that it doesnt recognize that particular format of csproj file for the project. How can I support both Windows and Linux using one solution file and proper csproj files?

Upvotes: 1

Views: 412

Answers (2)

Lex Li
Lex Li

Reputation: 63254

It is a smart move for Microsoft to dump project.json and move back to the existing MSBuild ecosystem, whether you like it or not, and Visual Studio 2017 is recommended like the other answer said.

But if you do have concerns moving to it, I think you can simply fire up Visual Studio Code,

https://code.visualstudio.com/docs/runtimes/dotnet

(Or JetBrains Rider).

Upvotes: 2

Scott Chamberlain
Scott Chamberlain

Reputation: 127603

csproj files created with dotnet migrate are only supported using the .NET Core Tools RC3 or newer.

Currently the only version of Visual Studio that supports that toolset is the Visual Studio 2017 release candidate, Visual Studio 2015 only supports up to the .NET Core Tools RC2.

When installing Visual Studio 2017 be sure to check the following box in the "Other Toolsets" section to include the latest release of the tools in the install

enter image description here

Upvotes: 4

Related Questions