views:

75

answers:

3

I made some changes to my solution which contains a couple of project and wanted to compile it again .. now it says Metadata file C:\myproject\bin\myproject.DLL could not be found... I closed the VS and opened again and also deleted the bin and obj folder of that project, but still the same compile error...

+3  A: 

Remove and re-add your reference.

klabranche
This fixed it. Thanks. Is it a Bug with VS? what had happened?
BDotA
Not a bug. As mentioned by @Franci Penov it could be that you were referencing the DLL in an output / bin directory that after a build and/or cleaning disappeared/changed. You want to either do a project reference which will always use the latest DLL for the project as it was last built OR reference the DLL in a folder you know isn't changing.
klabranche
+2  A: 

There is something somewhere in your projects that tells the build to look for that dll. Most probably you have a reference in one of the other projects that doesn't reference the project, but references the project output directly.

Franci Penov
And may be looking for a specific version of the DLL.
chris
well Ok, I checked the References for all other projects, if it is missing it should show it with a Yellow exclamation icon, Right?... but there is no Yellow icon in the references of the projets
BDotA
+1  A: 

This usually means one of the projects that other projects depend on in your solution isn't building correctly. Make sure you fix all errors and 'rebuild all'.

Robaticus