Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
169 views
in Technique[技术] by (71.8m points)

c# - What is the difference between a "build" and a "rebuild" in Visual Studio?

I do not know if i understood right , the difference between a "build" and "rebuild" command of a project in Visual Studio is the fact that a build only compiles the code which was changed , since a "rebuild" command compiles all the code from project regardless is it was changed or not.

Also a rebuild command includes a clean of the project, since build command does not ?

Please advice me to understand better these differences.

Thanks !

question from:https://stackoverflow.com/questions/4416888/what-is-the-difference-between-a-build-and-a-rebuild-in-visual-studio

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Also a rebuild command includes a clean of the project, since build command does not ?

You have identified the fundamental difference.

Build will look at the files that have been modified since the last successful compile and link and just compile those and then link the result.

Rebuild will recompile everything.

Strictly speaking it might be different to a clean (which removes the intermediate and output files) and build and just recompile everything, but the result should be the same. However, there may be cases that fail (see Femaref's comment).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...