VS2010 always rebuilds solution?
Asked Answered
K

2

3

I have a solution with 40 projects in it. I've recently reconfigured output path for each of these projects to this value:

..\Output

Change was made in *.csproj files for every build configuration.

This change did what was expected (gather all compiled assemblies into one folder) but unusual side effect is - every time I hit F5 Debug, portion of the (around 40%) assemblies always gets rebuilt. I have tested this several times without any changes to the projects themselves.

Once I undid changes build behaved as before.

I need help resolving this issue.

Kingmaker answered 4/11, 2011 at 13:17 Comment(0)
K
3

This issue is solved by changing the project files, cleaning solution, deleting all bin folders by hand, restarting Visual studio and rebuilding everything.

Kingmaker answered 7/11, 2011 at 9:26 Comment(2)
Changing project file - how??Oxidize
I think he meant doing whatever changes you needed to the project files (the output folder in the author's case) and then fixing the rebuild issue by cleaning the solution, deleting bin folders, etc. By the way, you can use the source control systems clean up function, no need to delete bin folders by hand.Countrybred
B
0

I would guess that the assemblies that get rebuilt are referenced from the project you are trying to build? Check the references in one of the projects, and see if this is correct. If so, you might try to adjust the properties for each reference, such as "Copy Local", and/or "Specific Version"; maybe each project "thinks" it needs to rebuild the other projects it references in order to achieve the same version number or something like that.

Barris answered 4/11, 2011 at 14:7 Comment(2)
The solution is now 6 years old and we've never had problem like this until I started to mess with OutputPath setting. Is there a way to 'debug' MSBuild to see whiat is the reason from rebuilding?Kingmaker
see comment here about diagnosing this: #7997741, and yes, you can debug msbuild, see Dan Moseley's msdn blog, Bing "debugging msbuild"Reckless

© 2022 - 2024 — McMap. All rights reserved.