如何从 Visual Studio 中的解决方案为特定项目运行干净的构建 [英] How to run a clean build for a particular project from a solution in visual studio

查看:16
本文介绍了如何从 Visual Studio 中的解决方案为特定项目运行干净的构建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我需要在命令行中构建一个完整的解决方案(包含多个项目),是否可以为特定项目运行干净的构建并为项目的其余部分运行增量构建?

Suppose I need to build a whole solution (which has multiple projects) in command line, is it possible to run a clean build for a particular projects and run an incremental build for the rest of the project?

谢谢.

推荐答案

使用 msbuild 并传递 Clean 和 Rebuild 目标:

Use msbuild and pass the Clean and Rebuild targets:

msbuild path	osolutionyoursolution.sln /t:Clean;Rebuild

或者,如果您只想重建单个项目:

Or if you only want to rebuild a single project:

msbuild path	oprojectyourproject.csproj /t:Clean;Rebuild

msbuild 在 Windows SDK 或 Visual Studio 命令提示符中可用.

msbuild is available in the Windows SDK or the Visual Studio Command prompt.

这篇关于如何从 Visual Studio 中的解决方案为特定项目运行干净的构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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