Link to a useful DLL after compiling a multi-project solution
I have a solution with multiple class libraries. When I compile every single library (and the site itself) the compilation always succeeds. But when I compile the solution as a whole, one of the referenced libraries ends up with a little yellow exclamation mark next to the failed library. In the error list, I:
The type or namespace name 'DLL NAME' could not be found (can't you see using directive or assembly reference?)
Metadata file 'C: \ Projects \ Project \ Trunk \ Source \ Core \ Bin \ Debug \ Company.ProjectCore.dll' could not be found
The odd thing is that the second time I compile (right after this post) my solution compiles successfully. So, compiling once fails. Compile twice is to succeed.
Can anyone suggest what I should do to fix this problem?
Thanks in advance.
a source to share
How do you add it to the project: by targeting the dll from the Debug folder or using Add reference / Projects? When yuo uses target dlls and auto increment to compile, the link might be broken for the wrong compilation order (dll version increments after the code that uses it). But I could be wrong. Perhaps this is a strange VS bug.
a source to share
OK, it was a permissions issue.
The My Solutions folder is the sibling folder to my binaries folder. I reference my DLLs there and say "Copy to Local" so they show up in my Debug folder at compile time. But it seems I forgot to set the proper permissions on the DLL so that was giving me problems and ASP.NET couldn't access it when I was making up the hence yellow exclamation mark. not me of course, why could I compile a second time (even if "copy to local" will be placed in the local debug folder, compile a second time, why would this happen if permissions deny access to the original DLL location?).
Anyway, thanks for the help
a source to share