Reputation: 4092
This one has had me stumped for over a year and seems really odd and really obscure. When I build my solution, it complains about a missing referenced DLL. When I rebuild it, the problem goes away. Whenever I do a clean this returns, i.e. have to attempt a build twice before it succeeds.
This is vague, but if warranted I can give a better explanation of solution structure. Since the workaround is simply to build twice, I've never bothered to give it more attention, buts its extremely annoying.
Also, the build fails because it seems the DLL is just absent, so code that references it after fails because of missing types from the DLL. The next time I initiate the build, it works fine.
Update:
Just found it relevant to also add that project A references the ValidationFramework.dll, as does project B, but project B references project A. Now when the build error occurs, its always when the compiler goes to project B, i.e. project A always builds successfully on both first and second build attempts.
Also, when project B fails, I can click "Build" over and over to no effect, it does require a "Rebuild", so whatever "fixes" the problem that is occurring happens prior to building project B (as the problem itself might as well).
Upvotes: 0
Views: 91
Reputation: 15579
This sounds vaguely familiar. I may have experienced this with vs.net 2003 or 2005 I don't recall. But it exhibited itself like this:
In debug builds the referenced C++/CLI would be copied to consuming assembly folders correctly but when I did release builds it would suddenly break because the referencing projects couldn't find them. It turned out to be a VS.NET bug that I thought was fixed in a service back but in the interim I added some post build steps to move the assembly by brute force to where it need to be.
Do your debug builds seem to work every time?
Upvotes: 0
Reputation: 12268
Is the missing DLL one of the projects being built in your workspace? Do you have the project dependencies set up so that the DLL project has to be built before the utilizing project is built?
Upvotes: 1