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 asp.net 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!!