Unexpected Error creating debug information file GG.PDB"--"
Solution 1
As requested, my comment as an answer:
Try cleaning the solution (under the Build menu in VS).
Since the build was interrupted half-way through by your power failure, the file isn't locked -- the build system is probably just in an inconsistent state (which a Clean Solution should fix).
Solution 2
This worked for me:
- Shut down VS.NET
- Browse to the project in Windows Explorer
- Delete the /obj/ folder.
- Delete the project outputs (.dll and .pdb) from /bin (not sure if this step is necessary)
- Can't hurt but might help: delete the project outputs from any other project /bin folders in the solution that is having issues (wasn't necessary for me)
- Restart VS.NET
- Rebuild
http://weblogs.asp.net/ssmith/archive/2003/08/12/23755.aspx
Solution 3
This happens once in a while in my environment and the problem probably has to do with the PDB file being locked (i.e., I'm guessing the last part of the error message is missing in your post). This is how it looks on my machine:
Unexpected error creating debug information file 'c:\dir\obj\file.PDB' -- 'c:\dir\obj\file.PDB: The process cannot access the file because it is being used by another process.'
In my case, cleaning the solution does not solve the problem and restarting is an overkill, so I usually just copy the full name of the pdb file (from the error) and execute this on the command line:
ren c:\dir\obj\file.PDB *.old
Solution 4
This worked for me: Close Visual studio and open visual studio using Run as Administrator and problem was solved.
Solution 5
Not need to restart or delete the file. Just rename the file and that is enough. If you try to delete the file it will give an error. Better just rename it & it will work. :)
Related videos on Youtube
zack_falcon
I'm currently an IT Student. I love computer games, good food, skating, football, and R/C Trucks.
Updated on March 15, 2020Comments
-
zack_falcon about 4 years
When I try to build my project, it returns the following error:
Error 1 Unexpected error creating debug information file 'D:\Documents\Lance\Documents\School\Capstone\GG\GG\obj\Debug\GG.PDB' -- '' GG
I've recently had the misfortune of having my PC restart on me, due to sudden power supply problems (maybe). This is while the project was building, before this problem started.
When the PC came back online I've noticed that the changes I've made to the program prior to the sudden power down was not saved. And, it won't build anymore.
-
Cameron almost 13 yearsTry cleaning the solution (under Build menu in VS)
-
Daniel A. White almost 13 yearshave you tried to do a clean build?
-
CharithJ almost 13 yearsAre you using an version control system? May be any locking issue?
-
zack_falcon almost 13 years@ CharithJ, I'm not using any version control system (whatever that is, sorry, new guy). Just 'vanilla' Visual Studio 2005. @ Cameron, thanks! That worked.
-
zack_falcon about 9 years@Cameron, I forgot to ask all these years - I just noticed it because it got a Famous Question badge - and I do apologize sincerely, but could you put your comment as an answer, so I could accept it?
-
Cameron about 9 years@zack: Haha, sure, no problem :-)
-
-
Bassem Wissa almost 11 yearsworked for me :) i the power went off and i that error happened, i deleted obj folder, then rebuild it worked cool.
-
Nick Orlando over 10 yearsThis worked, though I had to do an
iisreset
before I could do step 3, asw3wp.exe
was holding onto the .pdb file in /obj/ -
henrik over 10 yearsYes. Obviously the file is not important. Renaming the file worked like a charm :)
-
steinar over 10 yearsWell, I would say that the file is important, i.e. if you want to debug. But it will be recreated on the next build.
-
KMX about 8 yearsit worked for me first time.. but again it falls. I had to rename my assembly name to make it work. No need to restart your VS.