本文介绍了如何在未安装 Visual Studio 的情况下构建 .NET 4.6 Framework 应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

到目前为止,我可以使用命令行构建 .NET 4.5.2

Until now, I could build .NET 4.5.2 using command line

c:WindowsMicrosoft.NETFrameworkv4.0.30319MSBuild MySolution.sln

我唯一需要在计算机上安装的是 .NET Framework 和 Visual Studio 2010 外壳.

The only what I need to install on a computer was .NET Framework and Visual Studio 2010 shell.

现在我考虑升级到 .NET 4.6.但我无法找到如何在没有 Visual Studio 的情况下构建解决方案的方法.

Now I consider upgrading to .NET 4.6., but I cannot find a way how to build a solution without Visual Studio.

我不想安装 Visual Studio 2015,因为它对于这个托管的虚拟机来说太大了.我希望一些 MSBuild 或 Microsoft 软件包安装就足够了.

I don't want to install Visual Studio 2015, because it is too big for this hosted virtual machine. I hope some MSBuild or Microsoft package installation could be sufficient.

推荐答案

安装:

然后调用不同版本的 MsBuild 来构建您的解决方案:

Then call a different version of MsBuild to build your solution:

 C:Program Files (x86)MSBuild14.0BinMsBuild.exe MySolution.sln

注意,这可能不包含 Visual Studio 附带的所有位块和 sdk,因此您可能会遇到缺少 .targets 文件"或其他构建应用程序的问题.其他 SDK 可能会缓解这个问题:

Note, this may not contain all bits pieces and sdk's that ship with Visual Studio, so you may encounter "missing .targets files" or other problems building your application. Other SDKs may alleviate that problem:

这篇关于如何在未安装 Visual Studio 的情况下构建 .NET 4.6 Framework 应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-29 13:15
查看更多