Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error Creating Debug Information - Code Won't Compile

Tags:

I'm using VS 2008. When ever I make a change in my code and try to compile I get the following error:

Error 7 Unexpected error creating debug information file 'C:\Documents and Settings\jbezanson\My Documents\MyProjects\DispatchBoard\DispatchBoard\obj\Debug\DispatchBoard.PDB' -- 'C:\Documents and Settings\jbezanson\My Documents\MyProjects\DispatchBoard\DispatchBoard\obj\Debug\DispatchBoard.pdb: The process cannot access the file because it is being used by another process. ' DispatchBoard

Using Process Explorer, it is always devenv.exe that is locking the file. If I run in Release mode this does not happen. It started 2 days ago when I started a WPF application, and since then it happens with every application I work on.

The only info I could find from Google was referring to a bug in VS 2003.

Anyone else have this problem? How do I fix it? It is getting very annoying having to kill the file handle every time I want to compile.

like image 331
modernzombie Avatar asked Sep 25 '09 14:09

modernzombie


People also ask

How to find error in c#?

you can select each line while debugging and right click on that and click add watch option there, by this you can identify which line is producing error. Show activity on this post. If you look at the screenshot you posted you can see that the actual exception class is a System.


2 Answers

If you have multiple instances of VS open, close other instances (apart from the one you are trying to compile) - this may resolve the issue.

like image 195
Abbas Avatar answered Sep 23 '22 22:09

Abbas


When I have problems with locked files, I use Unlocker. (If you tried everything and it's not working, try this ;)

In case of broken link, here's a mirror.

like image 30
Jodi Avatar answered Sep 25 '22 22:09

Jodi