简体   繁体   中英

How to open .xproj file in VS2017/2015

I am having a .NET core Project with extension .xproj . When I open the project in VS 2017, the project file .xproj migrated to .csproj .

How to open the .xproj file Visual studio 2017 / 2015?

Do I need to install any tools?

When I tried to open the xproj in VS2015 . It gives the error The imported project "C:\\Program Files (x86)\\MSBuild\\Microsoft\\VisualStudio\\v14.0\\DotNet\\Microsoft.‌​DotNet.Props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. "C:\\Program Files (x86)\\MSBuild\\Microsoft\\VisualStudio\\v14.0\\DotNet\\Microsoft.‌​DotNet.Props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

Do I need to install any tools?

  1. As already discussed, project.json and .xproj are deprecated and no longer supported by Microsoft. VS 2017 can migrate a solution that has been created in VS 2017, as can running dotnet migrate from the command line.

  2. There is a way to continue working with project.json/xproj in VS 2015 (only 2015), by creating a global.json file in your solution directory and setting the value of sdk->version to the version of the installed preview2 cli (A folder matching the version exactly has to exist in C:\\Program Files\\dotnet\\sdk or else you get the error message Microsoft.‌​DotNet.Props was not found ). See https://github.com/dotnet/cli/blob/rel/1.0.1/Documentation/ProjectJsonToCSProj.md#how-do-i-work-with-projectjson-and-csproj-on-the-same-machine for more details.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM