Working with Visual Studio 2008, I got sometimes the error, that the pdb-file cannot be actualized. it was no big problem, I deleted it and made a new build and everything was fine. Now this error comes multiple times a day, and it get annoying. That can be the reason and how get I rid of it?

link|improve this question

50% accept rate
Where/how is the PDF file stored? Is it just stored in your local filesystem? Or is this some kind of share or network filesystem? – David Schwartz Nov 22 '11 at 17:26
Not pdf, the Debug-database pdb. – Antwortgenossenschaft Nov 22 '11 at 17:29
Sorry, I meant PDB. I guess I type PDF a lot more than PDB and my fingers were on auto-pilot. :) – David Schwartz Nov 22 '11 at 17:33
In the project in the same directory as the output-binary this file is placed. – Antwortgenossenschaft Nov 23 '11 at 9:27
feedback

1 Answer

up vote 3 down vote accepted

The .pdb cannot be written if it is in use by another program.

I can see 3 possibilities as to how this can happen :

  1. Two instances of Visual Studio 2008 are working on the same project (unlikely, I know)
  2. Some source control plug-in in Visual Studio 2008 has decided to also manage the .pdb, so one needs to delete the reference to it in that plug-in.
  3. Some files included in the solution are missing, so one needs to remove their references (ie. the files with the warning sign).
link|improve this answer
Would an anti-virus also cause this locking? – Randolph West Nov 23 '11 at 6:47
1  
@RandolphWest: Yes, it could, but this condition normally clears up almost immediately so that the pdb becomes very quickly again updateable. – harrymc Nov 23 '11 at 8:21
Ah yes, that makes sense. – Randolph West Nov 23 '11 at 9:01
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.