简体   繁体   English

可以从命令行编译和测试解决方案的构建脚本

[英]a build script that can compile and test the solution from the command line

I am building a console application with visual studio 2013. I'm given two requirements, and I need help with what exactly I need to do with #2. 我正在用Visual Studio 2013构建一个控制台应用程序。我有两个要求,我需要在#2方面真正需要帮助。

  1. Create a console application that does XYZ. 创建一个执行XYZ的控制台应用程序。
  2. Solution must have a build script that can compile and test the solution from the command line. 解决方案必须具有可从命令行编译和测试解决方案的构建脚本。

My understanding was that the project file is just a build script. 我的理解是项目文件只是一个构建脚本。 But now I'm confused. 但是现在我很困惑。 Do I need a separate build script to achieve this? 我是否需要单独的构建脚本来实现这一目标? Or modify the existing project file? 还是修改现有的项目文件? Please help. 请帮忙。 Thanks in advance. 提前致谢。

The csproj or vbproj files are the project files which MSBuild use to build the project when you hit build/rebuild from Visual Studio. csproj或vbproj文件是项目文件,当您从Visual Studio中单击生成/重建时,MSBuild会使用该文件来生成项目。 You can call MSBuild from Visual Studio command prompt like: 您可以从Visual Studio命令提示符下调用MSBuild,如下所示:

MSBuild.exe MyProj.csproj /property:Configuration=Debug

Read MSBuild Overview for more inforamtion. 阅读MSBuild概述以获取更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM