如何在未安装Visual Studio的情况下构建.NET 4.6 Framework应用程序? [英] How to build .NET 4.6 Framework app without Visual Studio installed?

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

问题描述

直到现在,我都可以使用命令行来构建.NET 4.5.2

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

c:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild MySolution.sln

我唯一需要在计算机上安装的是.NET Framework和

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.

推荐答案

安装:

  • The .NET 4.6 Framework
  • The Microsoft Build Tools 2015
  • The .NET Framework 4.6 targeting Pack

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

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

 C:\Program Files (x86)\MSBuild\14.0\Bin\MsBuild.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:

  • The Windows 10 Platform SDK
  • The Azure SDK

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

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