Solution | Unable to write output file ‘…pdb’; unspecified error

Visual Studio 2005 / 2008

During this weekend, I started having a problem when building a solution in Visual Studio. It would load the following error:

Unable to write to output file Solution_Name.pdb

This Visual Studio solution has 8 projects, and a lot of files and folders. I tried several solutions that I found on the net, which worked for others, but none worked for my case including:

  • Delete the .pdb file from the solution – Didn’t Work
  • Delete the Debug folder – Still Didn’t work
  • Delete the whole obj Folder – Nothing
  • Cleaned the solution
  • Re-Build the solution
  • locate file, or folder, select them, right-click, and turn off the ‘Read only’ attribute – It wasn’t On
  • Reboot Machine (classic) – Still didn’t work

Someone even recommended to create a new solution and copy and paste each file, but the system I’m working on is being used by other developers and it’s too big to copy and paste each file.

Then I found this post on forums, which had the same problems as I did, multiple projects and same error. You need to just remove the references of the files which are not in the solution (ie. the files with the warning sign).

When I rebuilt, everything worked again!! Thanks carol123!!


7 Responses

  1. I had the same error message while trying to debug a classic asp project in VS2010.
    I used your advice and it solved the problem.
    thanks !

  2. I simply couldn’t leave your site prior to suggesting that I extremely enjoyed the standard information an individual provide on your guests? I’m going to be back regularly to check up on new posts!

  3. Thank you! Pointing out that we should look for the files with the warning sign did the trick- I didn’t think that file was related to the problem, but I guess it was!

  4. I´ve read a lot of posts about this problem, even one from msdn saying that you need to reinstall VB. with no results. Then I read this post and removed all files with warning sign as it says, and then all worked. Thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *