且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何阻止Visual Studio删除SLN文件中的项目依赖项(或让MSBuild不需要它们)

更新时间:2021-07-26 09:58:24

首先,实际上说明你正在使用哪个版本的Visual Studio有用。另外,您使用的是Visual Studio附带的MSBuild,还是使用来自.NET Framework的MSBuild?

First of all, actually stating which version of Visual Studio you are using would be useful. Also, are you using the MSBuild that comes with Visual Studio or are you using MSBuild that comes from the .NET Framework?

其次,VS2017和2019附带的MSBuild完全理解项目引用。所以我建议您使用Visual Studio开发人员命令提示符或Visual Studio构建工具包来构建。

Secondly, MSBuild that comes with VS2017 and 2019 understands project references perfectly fine. So I would suggest you use the Visual Studio developer command prompt, or the Visual Studio build tools package to build.