I’m experiencing something very unusual in my VS2010 today which it hasn’t done in the past.
I have a solution with 8 projects inside. One of them is a central DLL project which contains the bulk of the code.
When I open VS and open the solution, I can press F6 to build and everything happens as expected. If I comment a line out or something and press F6 again to build, there is an error. It can’t copy the DLL from the obj\Debug folder to the main output folder because it is in use by another process. If I close the IDE and restart it, I can rebuild the solution with no problems, but only once. Closing the solution and re-opening it (without restarting the whole IDE) doesn’t help.
When I search for the handle to the DLL in Process Explorer, it is VS2010 itself!
Basically, I have to restart my whole IDE every time I want to build my solution, which is obviously completely impractical.
VS2010 has never done this with me before. Any ideas on what it might be and what I can try?
Happened once to me, I solved it by deleting all the references to that particular project then re-adding them. YMMV.