I have a large solution containing many C# projects. When I open the solution and hit F5 for the first time, I get compile errors like the following:
Error 3 Metadata file ‘C:\Users\david\Documents\VS.Projects\CeoTrunk\Ceoimage\bin\x86\Release\Ceoimage.dll’ could not be found.
I’m compiling the solution and the projects producing the error for ‘Debug (Any CPU)’ and I haven’t selected ‘Release (x86)’ for a long time. Maybe months. These errors go away after I build the solution for ‘Debug (Any CPU)’ the first time. If I close the solution and hit F5 again, the problem reappears.
Where could this ‘Release (x86)’ remnant be hiding? How do I get rid of it? Why does it keep coming back?
Without seeing your solution and project files, here is what I suggest.
Unfortunately, it could come down to a cyclic dependency or some other convoluted dependency tree that means Visual Studio is struggling to determine a valid build order, hence requiring multiple builds to complete the process.