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.

Nezreli
  • 1,278
  • 4
  • 16
  • 34

2 Answers2

3

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

Nezreli
  • 1,278
  • 4
  • 16
  • 34
  • Changing project file - how?? – cacau Jul 29 '14 at 12:15
  • 1
    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. – Vlad Oct 10 '14 at 09:33
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.

Kjartan
  • 18,591
  • 15
  • 71
  • 96
  • 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? – Nezreli Nov 04 '11 at 14:41
  • 1
    see comment here about diagnosing this: http://stackoverflow.com/questions/7997241/re-configuring-solution-with-many-projects, and yes, you can debug msbuild, see Dan Moseley's msdn blog, Bing "debugging msbuild" – Brian Kretzler Nov 05 '11 at 23:33