How to open .xproj file in VS2017/2015

喜你入骨 提交于 2021-02-08 14:19:10

问题


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.

Do I need to install any tools?


回答1:


  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.



来源:https://stackoverflow.com/questions/43679083/how-to-open-xproj-file-in-vs2017-2015

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!