I keep running into this issue in my multi-project VS.NET solutions. For some reason, something is locking the dll(s) in the /obj/ folder of library components. The fix that I have at the moment is as follows:
- Shut down VS.NET
- Browse to the project in windows explorer
- Delete the /obj/ folder.
- Delete the project outputs (.dll and .pdb) from /bin (not sure this step is necessary)
- (can’t hurt, might help) — delete the project outputs from any other project /bin folders in the solution that is having issues.
- Restart VS.NET
- Laugh the next time you hear that DLL Hell is no more in .NET…
Update: Just deleting /obj/ after closing VS.NET does it. Ambrose pointed me to prcview.exeand that demonstrated that it is in fact devenv.exe locking the file, so it’s VS.NET’s own fault, not Index Server or anything else that is to blame.