For some reason this error started popping up today on one of my projects.

Error 1 Unable to write to output file 'C:\MyProject\Release\MyProject.pdb': Unspecified error

If I go into advanced compile options and change it to not generate and debug info, my project compiles fine.

I have tried setting the permissions on the Release folder to full for everyone, so I would assume it's not a permissions issue. Also, I don't see anything in my log files that would provide me with more information about the issue.

Does anyone know why this error would just start showing up or a way to fix it?

Thanks.


Update: I have rebooted my machine, restarted VS several times and have even completely deleted the existing OBJ file where the issue is happening. It's still giving me the same error.

This is a simple one project solution that was working fine just last week. It appears to be an issue with VS trying to build the PDB file because I can delete them out of the Release and Debug folders without issue. When I try rebuilding them VS will start creating the file (about 1.4MB is size) but I still get the error.

I wanted to add on top of the typical Turn it off and on again with the reason why that's helpful.

Visual studio can get wrapped around the axle when building a project so that it can't figure out why it's missing a particular dependency, it just knows that it can't build the project.

Here's an undescriptive error message after a failed rebuild:

Unhelpful Error

The solution is to:

  1. Close Visual Studio
  2. Open Visual Studio
  3. Do Not Compile - Look at the error list for a new descriptive error:

Helpful Error

A lot of the existing instructions are missing the third step, so I thought this might be helpful.