visual-studio Visual Studio (2008)“清洁解决方案”选项
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/221803/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Visual Studio (2008) 'Clean Solution' Option
提问by Julius A
What does this option do? It is accessible from the Build menu.
这个选项有什么作用?可以从“构建”菜单访问它。
回答by David Arno
It deletes all the compiled and temporary files associated with a solution. It ensures that the next build is a full one, rather than only changed files being recompiled.
它会删除与解决方案关联的所有已编译文件和临时文件。它确保下一个构建是完整的,而不仅仅是重新编译更改的文件。
回答by goldenmean
It deletes all the object code generated during previous compilation/build. It deletes all below kind of files:-
它会删除之前编译/构建期间生成的所有目标代码。它会删除以下所有类型的文件:-
*.obj - object code
*.obj - 对象代码
*.pdb - program debug databse file
*.pdb - 程序调试数据库文件
*.bsc - source browser databse
*.bsc - 源浏览器数据库
*.ilk - incremental linker file
*.ilk - 增量链接器文件
*.sbr - source browser intermediate file
*.sbr - 源浏览器中间文件
*.idb - rebuild dependency file
*.idb - 重建依赖文件
*.lib - library file
*.lib - 库文件
*.exe - executable
*.exe - 可执行文件
JFYI - Even a Rebuild All command will do all this and then go on to build the complete set of source files.
JFYI - 即使是 Rebuild All 命令也会完成所有这些,然后继续构建完整的源文件集。
-AD
-广告
回答by Charles
I wanted this to be a comment but apparently need 50 rep.
我希望这是一个评论,但显然需要 50 代表。
To warn others, I find the rebuild solution doesn't do a clean myself. I'll often not I need to clean it and build/rebuild it after for it to work - I think rebuild it's self forces a full compile without clean and overrides everything, but does not get rid of the extras.
为了警告其他人,我发现重建解决方案本身并没有清理干净。我通常不需要清理它并在它工作后构建/重建它 - 我认为重建它是自我强制完整编译而不清理并覆盖所有内容,但不会摆脱额外内容。
Did not look into what rebuild does code wise, just a general observation in case someone else has the same issue.
没有研究什么重建是明智的,只是一个一般性的观察,以防其他人有同样的问题。
回答by lordcheeto
This is an old post, but I thought this was worth mentioning. When coding for Silverlight, I usually have Blend and VS2010 open at the same time. Because of that, sometimes VS2010 freaks out and IntelliSense can't find where stuff is or something, resulting in it falsely highlighting a lot of errors.
这是一个旧帖子,但我认为这是值得一提的。在为 Silverlight 编码时,我通常同时打开 Blend 和 VS2010。正因为如此,有时 VS2010 会吓坏了,IntelliSense 无法找到东西在哪里或其他东西,导致它错误地突出显示了很多错误。
Cleaning the solution fixes this.
清洁溶液可解决此问题。
回答by Brian Knoblauch
Erases files created during compilation process. Effectively forces a full recompile/build next time.
擦除在编译过程中创建的文件。下次有效地强制完全重新编译/构建。
回答by ersanbilik
careful when you are cleaning a solution; when you do clean a solution and if you reference to a library (say nhibernate) in your project and if that library has a dependency ( say iesi.collections) , then you'll see iesi.collections will be deleted even if you rebuilt the solution and you have to put that dll to your folder, again. or you can also reference to iesi.collections and choose copy-local : yes option from its properties
清洁溶液时要小心;当你清理一个解决方案,如果你在你的项目中引用了一个库(比如 nhibernate),并且如果该库有一个依赖项(比如 iesi.collections),那么你会看到 iesi.collections 将被删除,即使你重建了解决方案,您必须再次将该 dll 放入您的文件夹。或者您也可以参考 iesi.collections 并从其属性中选择 copy-local : yes 选项
回答by AnneTheAgile
FYI, neither Clean nor Rebuild will delete non-build files, eg files copied during a pre-build command. I had been confused about that!
仅供参考,Clean 和 Rebuild 都不会删除非构建文件,例如在预构建命令期间复制的文件。我一直对此感到困惑!

