visual-studio 我可以在不安装 Visual Studio 的情况下编译 Visual Studio 解决方案 (.sln)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1389606/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-22 10:58:41  来源:igfitidea点击:

Can I compile visual studio solutions (.sln) without installing visual studio

visual-studiovisual-c++

提问by Krishna Kumar

Can I compile visual studio solutions (.sln) without installing visual studio. Can I install something like a VS SDK to do this?

我可以在不安装 Visual Studio 的情况下编译 Visual Studio 解决方案 (.sln) 吗?我可以安装类似 VS SDK 的东西来做到这一点吗?

The solution is a VC++ one.

解决方案是 VC++ 之一。

回答by MSalters

I think the SDK still comes with MSBuild and a barebones compiler. You might also want to look at "VS Express", depending on your reasons not to install Visual Studio.

我认为 SDK 仍然带有 MSBuild 和准系统编译器。您可能还想查看“VS Express”,这取决于您不安装 Visual Studio 的原因。

回答by Custodio

You can try call the MSBuild.exe which become wiht the .NET Framework 3.5 and probability with old versions too. I actually use this for my NAnt builds.

您可以尝试调用 MSBuild.exe,它在 .NET Framework 3.5 和旧版本中也有概率。我实际上将它用于我的 NAnt 构建。

use something like:

使用类似的东西:

"dotnet.dir" /msbuild.exe ./solutionX.sln" /v:q /nologo /p:Configuration=Release

回答by pjbelf

You should be able to use vcbuild.exe to do it. I believe it is included with the Windows SDK.

您应该能够使用 vcbuild.exe 来做到这一点。我相信它包含在 Windows SDK 中。

Certain C++ libraries such as MFC and ATL only ship as part of visual studio so you will need visual studio on the machine to build if you make use of any of these.

某些 C++ 库(例如 MFC 和 ATL)仅作为 Visual Studio 的一部分提供,因此如果您使用其中任何一个,则需要在机器上使用 Visual Studio 进行构建。

回答by Peter Gfader

Luís Custódio is right.
Visual Studio is launching msbuild under the hoods...

Luís Custódio 是对的。
Visual Studio 正在幕后启动 msbuild...

Tip
Change the setting for the verbosity of the build output to see some details in Tools | Options | Projects and Solutions | Build and Run

提示
更改构建输出详细程度的设置以查看工具 | 中的一些详细信息。选项 | 项目和解决方案 | 构建和运行

alt text

替代文字

回答by Daniel Elliott

You might try SharpDevelopand see if it can compile your project. It is an open source "Visual Studio lite"

您可以尝试SharpDevelop并查看它是否可以编译您的项目。它是一个开源的“Visual Studio lite”

回答by Jamil Khan

Nah.You need some kind of compiler until you save it as .exe file.

不。在将其保存为 .exe 文件之前,您需要某种编译器。

回答by Mohit Deshpande

You can try to build the C++ files with Cygwin with the command: gcc "filename.cpp"

您可以尝试使用 Cygwin 使用以下命令构建 C++ 文件: gcc "filename.cpp"