如何在VS2017/2015中打开.xproj文件 [英] How to open .xproj file in VS2017/2015

查看:74
本文介绍了如何在VS2017/2015中打开.xproj文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个扩展名为 .xproj 的.NET核心项目.当我在VS 2017中打开项目时,项目文件 .xproj迁移到了.csproj .

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.

如何打开.xproj文件Visual Studio 2017/2015?

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

我需要安装任何工具吗?

Do I need to install any tools?

当我尝试在VS2015中打开xproj时.它给出错误找不到导入的项目"C:\ Program Files(x86)\ MSBuild \ Microsoft \ VisualStudio \ v14.0 \ DotNet \ Microsoft.‌DotNet.Props".确认< Import>中的路径是否正确.声明是正确的,并且该文件存在于磁盘上.

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. 正如已经讨论的那样,不建议使用project.json和.xproj,Microsoft不再支持.VS 2017可以迁移在VS 2017中创建的解决方案,就像从命令行运行 dotnet migration 一样.

通过在解决方案目录中创建 global.json 文件并设置的值,有一种方法可以在VS 2015(仅2015年)中继续使用project.json/xproj.sdk->版本到已安装的Preview2 cli的版本(与该版本完全匹配的文件夹必须存在于 C:\ Program Files \ dotnet \ sdk 中,否则会收到错误消息 Microsoft.‌DotNet.Props未找到).参见

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.

这篇关于如何在VS2017/2015中打开.xproj文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆