Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28384 Discussions

Slightly off topic: a question about Visual Studio

Arjen_Markus
Honored Contributor I
194 Views
Hello,

currently we use VS 2008 most of the time and have done so for a couple of years, but yesterday
I was confronted with behaviour that I had not been aware of before: the option "Rebuild solution"
is not the same as "Clean solution" followed by "Build solution".

This surfaced after splitting up a few directories and introducing new projects, so that the
dependencies had to be reset. I did so by rebuilding the solution and adjusting the dependencies
for the projects that could not be built. But when I thought I had finished the work, my colleague
took the source code from the repository, did a Clean build and got 700 or so errors when
trying to build it anew. So I spent the rest of that afternoon trying to make it all work again.
Sofar the war story.

Can anyone explain what Rebuild solution does (and is supposed to do)? And what Clean solution
does? (When I voicedmy frustration over this, I heard from other colleagues that they do not
even trust "Clean solution") Sorry to sound a bit angry, but it was a less than comfortable
experience.

Regards,

Arjen
0 Kudos
5 Replies
Steven_L_Intel1
Employee
194 Views
As best as I can tell, Rebuild is the equivalent of Clean followed by Build Solution. What Clean does is delete from each projects's Intermediate and Output directories (Project property General > Intermediate Directory and Output Directory) all files with file types listed in General > Extensions to Delete on Clean. You might get into trouble if you have modified the intermediate directories to overlap.
0 Kudos
Arjen_Markus
Honored Contributor I
194 Views
Odd, I checked the settings and there is nothing suspicious. I do not think anybody ever
tempers with these settings either.

I would have thought the two were equivalent, but they clearly were not. Very strange.

Thanks for your reply anyway.

Regards,

Arjen
0 Kudos
dannycat
New Contributor I
194 Views

Your problem may be related to generated interface files which may have been left over. If you have moved parts of your application to different directories these may have got left behind thus confusing the compiler. The dependency checker does not check these files and this can result in errors being flagged up that shouldn't be. I believe the guys at Intel are improving this aspect of their compilers.

0 Kudos
bmchenry
New Contributor II
194 Views
i'd also add that you may also have straggler object files around given that you were moving things, etc which may be creating the differences.
In an earlier thread more than a year ago i complained 'why doesn't clean really clean' meaning delete all items from the build directory and Steve corrected me that doing socould wreak further havoc if the build directory also contains objects, etc from other projects/solutions.
so you may need to manually clean your build directories after the move/split of your project to different directories and then once 'truly cleaned' the two commands should be equivalent.
0 Kudos
Arjen_Markus
Honored Contributor I
194 Views

Idivine from observing the files in the build directory that "Rebuild solution" marks the targets as out-of-date, rather than removing all the files that might be generated bythe project/solution.

I can understand the difficulties of determining the correct actions to take, but it is still an awkward issue.
Well, I will have to live with this, I suppose. At least now I know ;).

Regards.

Arjen

0 Kudos
Reply