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

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

问题描述

Visual Studio中的生成解决方案",重建解决方案"和清理解决方案"之间有什么区别?

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?

推荐答案

  • 构建解决方案将执行增量构建:如果它不认为,则需要重建项目,而不会.如果未更改,它也可能会使用项目的部分构建的位(我不知道需要花多长时间)
  • 重建解决方案将清除,然后从头开始构建解决方案,而无需理会之前所做的任何事情.与先清理,再生成"的区别在于,重建"将一次清理-然后生成每个项目,而不是先清理然后再构建.
  • 清洁解决方案将删除该版本先前构建的工件.如果构建目标目录(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天全站免登陆