Most of the developers who are using Visual studio have encountered the above problem. The problem is whenever you tried to attach debugger with your project at that time you got the above issue. As an ASP.Net Developer I had faced this issue often, especially when we deal with class libraries. So the below are my tricks to get ride of this issue.
- Just Close the VS IDE.
- Go to Task Manager and kill the worker process. (If you are working on ASP.Net application).
- Go to the .Net installation folder ( Normally it should be
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files OR C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files) and clear the temp files from the temporary folder.
- Open the solution and "Rebuild" entire solution. Now try to attach the debugger.
Please note that, in some machines you may have 2 framework installation, one for 32-bit and another for 64-bit. So when you go with step 3, pay close attention and make sure which .net framework was used and also which version no (either 2,3,3.5 or 4) was used by your application.
Hope this helps!