pdb and insufficient disk space

pdb and insufficient disk space

I wasn't having this problem until right after doing several uninstalls/reinstalls of VS 2012 to resolve an unrelated problem.  But now I've got it.  I've seen that others have experienced this, too.  Is there a solution?

An "update" of VS 2012 from the Microsoft web site didn't help. 
What I have installed now is 11.0.61030.00 Update 4


Brian in Austin, Texas


7 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Try deleting the .pdb file and rebuilding. Sometimes if the PDB file gets corrupted you can get this error.

Retired 12/31/2016

Windows won't let me delete the pdb file unless I close VS (access violation).  That ought to be a clue that something is gummed up in VS.

If I close VS, I can delete the pdb file, but that doesn't seem to help.  The problem keeps coming back.  Somehow, I did something that triggered this because it wasn't a problem a few weeks ago.

Closing the Solution and reopening isn't good enough.  VS must be closed.  It's happening every time now.  I can do one build, but then have to restart VS to do another build.

As an experiment, temporarily turn off your antivirus software and see if the problem remains.

Retired 12/31/2016

Could the problem be the one explained in this topic.

As I explained in there, I use LockHunter solution with VS2012 and it works well:


As I mentioned earlier, the problem occurs for me when Visual Studio 2012 retains a lock on the program database file, almost always from an abruptly terminated debug session. This lock issue does not occur for me with Visual Studio 2010.

One solution that works well for me with Visual Studio 2012 is explained here. Note it involves installing the LockHunter freeware, hence beware of the consequences of doing so in your computing environment:

user1011648 said:


I have finally found a workaround solution for this problem that has been plaguing me for quite sometime:

1) Download and install LockHunter (free utility to unlock locked files):


2) Add the install directory of LockHunter to your environment variable "path" to avoid annoying administrator privilege popups every time you run the utility. For me (using x64 version) it was: "C:\Program Files\LockHunter"

3) Add the following pre-build event to your Visual Studio project that is experiencing the issue:

"C:\Program Files\LockHunter\LockHunter.exe /silent /unlock $(TargetDir)$(TargetName).pdb"




Turning off the firewall didn't help.

I installed Unlocker 1.9.2 (while skipping several "addon" products), and using that to unlock the pdb file gets around the problem so I don't have to restart VS.  Yipee!

I still don't know what's gummed up VS 2012, but maybe it will go away in later VS update.

Thanks for the help.


Brian in Austin, Texas

Leave a Comment

Please sign in to add a comment. Not a member? Join today