visual-studio-2010 - 如何在特定配置下构建解决方案中的所有项目(就像您选择 "Rebuild Solution"一样)

标签 visual-studio-2010 msbuild

我必须在特定配置(调试、发布)中构建解决方案中的所有项目,就像选择“重建解决方案”时 Visual Studio 所做的一样。

我怎样才能用 msbuild 做到这一点?

我希望二进制文件应该像往常一样出现在 project\bin\debug|release 文件夹中。

我尝试了几个我在互联网上找到的 msbuild 配置文件,但没有成功。

请帮我自动化这样的任务,并提前致谢!

最佳答案

MSBuild.exe sample.sln /t:Rebuild /p:Configuration=Release;Platform=AnyCPU
MSBuild.exe sample.sln /t:Build /p:Configuration=Release;Platform=AnyCPU
MSBuild.exe sample.sln /t:Clean /p:Configuration=Release;Platform=AnyCPU

关于visual-studio-2010 - 如何在特定配置下构建解决方案中的所有项目(就像您选择 "Rebuild Solution"一样),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5258121/

相关文章:

c - 使用 VS2010 构建的应用程序在 VS-Express2008 中不起作用 - C

c# - Visual Studio 扩展 : Editing code files in the current solution?

c# - 仅在未附加调试器的情况下运行 C# 应用程序时出现访问冲突异常

visual-studio - MSBuild 的版本历史是什么?

c# - ADO.NET 实体对象生成器

msbuild - 以独立于平台的方式从 msbuild 项目运行 .net 可执行文件

sql-server - 在 Ubuntu 中构建 SQL Server 数据库项目

msbuild - 在MSBuild中选择包含特定子字符串的文件

msbuild - 开盖中缺少 PDB

visual-studio - Visual Studio 扩展和 Visual Studio 11 Dev。预习