views:

22

answers:

2

hi, strange 1 here.. have a solution with multiple projects in (mvc2 application, class library etc). the solution will not build in debug mode anymore. 1 if the projects isnt building its DLL anymore (although it creates reference dll's in the bin\debug folder). this gives me the error: Metadata file 'C:[solution]\bin\Debug[myprojectname].dll' could not be found. if i put the build into release, all my dll's build and solution correctly loads.

any idea why this is happening?

thanks

A: 

If you have lots of Metadata errors in build output, there is usually one compilation error way at the bottom of the list. Do you have any compiler directives in your code (like #ifdef DEBUG that would be causing problems?

Sometimes VS gets confused and I have to go manually clean the bin folders for it to recompile. I usually create a batch file and put it in the root of my solution to do this for me.

Clean.bat:

FOR /F "tokens=*" %%G IN ('DIR /B /AD /S bin') DO RMDIR /S /Q "%%G"
FOR /F "tokens=*" %%G IN ('DIR /B /AD /S obj') DO RMDIR /S /Q "%%G"

I run this whenever VS starts misbehaving. If that doesn't work then it's time for a reboot.

Ryan
A: 

Check Build - Configuration Manager. For each project in your solution you can check if it should be build and some more things. I found that sometimes a project just got unchecked so it wont build,....

JerryVienna