Visual Studio 中生成解决方案、重建解决方案和清理解决方案之间的区别? [英] Difference between Build Solution, Rebuild Solution, and Clean Solution in Visual Studio?

查看:62
本文介绍了Visual Studio 中生成解决方案、重建解决方案和清理解决方案之间的区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Visual Studio 中的 Build Solution、Rebuild Solution 和 Clean Solution 有什么区别?

What is the difference between Build Solution, Rebuild Solution, and Clean Solution in Visual Studio?

什么时候使用其中每一种的合适时间?

When is the appropriate time to use each one of these?

推荐答案

  • 构建解决方案将执行增量build:如果它不认为需要重建一个项目,它就不会.如果它们没有改变,它也可能使用项目的部分构建部分(我不知道这需要多远)
  • 重建解决方案 将清理,然后从头开始构建解决方案,忽略之前所做的任何事情.这与清理,然后构建"之间的区别在于,重建将清理然后构建每个项目,一次一个,而不是先清理所有项目,然后再构建所有项目.
  • 清洁解决方案 将删除构建先前构建的工件.如果构建目标目录(bin 和 obj)中有任何其他文件,它们可能不会被删除,但实际的构建工件是.我已经看到这种情况的行为有所不同 - 有时删除相当彻底,有时没有 - 但我暂时会给 VS 带来怀疑的好处:)
    • Build solution will perform an incremental build: if it doesn't think it needs to rebuild a project, it won't. It may also use partially-built bits of the project if they haven't changed (I don't know how far it takes this)
    • Rebuild solution will clean and then build the solution from scratch, ignoring anything it's done before. The difference between this and "Clean, followed by Build" is that Rebuild will clean-then-build each project, one at a time, rather than cleaning all and then building all.
    • Clean solution will remove the build artifacts from the previous build. If there are any other files in the build target directories (bin and obj) they may not be removed, but actual build artifacts are. I've seen behaviour for this vary - sometimes deleting fairly thoroughly and sometimes not - but I'll give VS the benefit of the doubt for the moment :)
    • (链接指向 devenv.exe 命令行开关,但它们的作用与菜单项相同.)

      (The links are to the devenv.exe command line switches, but they do the same as the menu items.)

      这篇关于Visual Studio 中生成解决方案、重建解决方案和清理解决方案之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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