如何通过Visual Studio中的解决方案为特定项目运行全新版本 [英] How to run a clean build for a particular project from a solution in visual studio

查看:86
本文介绍了如何通过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并传递清理和重建目标:

Use msbuild and pass the Clean and Rebuild targets:

msbuild path\to\solution\yoursolution.sln /t:Clean;Rebuild

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

Or if you only want to rebuild a single project:

msbuild path\to\project\yourproject.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天全站免登陆