0

I have started programming with Qt Framework using c++ a week ago. I am using Microsoft Visual Studio 2017 and I am curious about when to use build and rebuild solution.

I know that Build solution is an incremental build and it only builds the changes and rebuild solution cleans the already built solution and builds again.

So when to use build solution (maybe clean first then build) and when to use rebuild solution?

I would be glad if someone could explain this to me with giving issues as examples.

BUY
  • 705
  • 1
  • 11
  • 30
  • Most of the time "Build" is sufficient. However it worth to run "Rebuild" for the final test to know whether all components are building properly. I believe "Rebuild" invokes "Clear" and then "Build". – vahancho May 18 '18 at 11:59
  • Is the explanation on MSDN not sufficient? https://msdn.microsoft.com/en-us/library/5tdasz7h.aspx – Killzone Kid May 18 '18 at 12:00
  • There is a subtle difference which is worth being aware of between rebuild and clean + build. See this previous SO https://stackoverflow.com/a/1247480/173633 Namely, Rebuild does each project one by one; whereas clean + build will 1st clean them all *then* build them – stan4th May 18 '18 at 12:01
  • There is [this](https://stackoverflow.com/a/3095935/4427870) remarkable answer. Also this question is a duplicate of https://stackoverflow.com/q/3095901/4427870 – Rishav May 18 '18 at 12:12
  • 4
    Possible duplicate of [Difference between Build Solution, Rebuild Solution, and Clean Solution in Visual Studio?](https://stackoverflow.com/questions/3095901/difference-between-build-solution-rebuild-solution-and-clean-solution-in-visua) – Rishav May 18 '18 at 12:13
  • @Rishav I have already checked that question and its answers that you've said to be a duplicate of mine. I am not asking what is the difference between build and rebuild. I am asaking which is more efficient/proper to use when? – BUY May 18 '18 at 12:26
  • @vahancho Thank you for your kind answer it clarified this matter for me a bit. But I would be really glad if other programmers can give some examples to me about this too. – BUY May 18 '18 at 12:28
  • @stan4th I have already checked that question and its answers that you've said to be a duplicate of mine. I am not asking what is the difference between build and rebuild. I am asaking which is more efficient/proper to use when? – BUY May 18 '18 at 12:30
  • @KillzoneKid I am not asking what is build or rebuild or clean. So it is not sufficient. – BUY May 18 '18 at 12:31
  • @BerkUtkuYenisey Does it not explicitly say something like **Choose Build or Build Solution to...** or **Choose Rebuild Solution to...**? – Killzone Kid May 18 '18 at 12:34
  • @KillzoneKid you are right it does say Choose Build or Build Solution to compile only those project files and components that have changed since the most recent build. I am aware of that and I have that knowledge. I am just asaking for a programmer advice on which is more secure or efficient to use when? – BUY May 18 '18 at 12:42
  • @BerkUtkuYenisey obviously Build is most efficient, but I think the ReBuild and Clean and Build are necessary options when project dependencies are wrong. If there is a sort of cyclic dependency then cleaning all 1st will cause solution not to build. Also, I think these a required because MS tools don't always work as we may wish! – stan4th May 18 '18 at 14:37

1 Answers1

0

Based on clarification of question; Obviously Build is most efficient, but I think the ReBuild and Clean and Build are necessary options when project dependencies are wrong. If there is a sort of cyclic dependency then cleaning all 1st will cause solution not to build. Also, I think these a required because MS tools don't always work as we may wish!

stan4th
  • 710
  • 1
  • 6
  • 19
  • Thank you so much for this answer. I was asking this but everyone thought that I was asking what is build and what is rebuild although I have stated I was not. – BUY May 21 '18 at 06:58