Visual Studio Error: Unable to write to output file...
Jun
28
Written by:
6/28/2007
If your Visual Studio crashes as much as mine does, you have invariably ran into an error stating "Unable to write to output file [filepathandname]: Unspecified error". At first, this error really ticked me off, as it left me with no path to troubleshoot and/or correct the error.
The problem?
Now let me digress to the behavior that occurred just prior to the error... Although I am running on a relatively clean install of Windows XP (not upgrading to Vista anytime in the near future), and Visual Studio 2005, i have many instances where Visual Studio 2005 will freeze for seemingly no reason. Sometimes, whatever is holding it up will clear out and I can get back to work. Other times, I have to force it to close through Task Manager.
Just before this error occurs, Visual Studio would have frozen and closed either due to it capturing an error, or because I had no choice but to close it. When I reopen it and attempt to build a project or solution, it will sometimes return this error.
Unable to write to output file [FILENAME]: Unspecified error
If you attempt to rebuild instead of build, it will do nothing. You can close and reopen the program... No dice. Since it kind of sounds like a permissions error, you could check the permissions throughout your system. It won't help. You can do the unthinkable and reboot your machine and this error will not go away.
The cause?
So... What caused it? Why is this happening to me (you)?
This problem is there due to Visual Studio not being able to resolve the location of a file that is supposed to be in your project. Either the folder name or file name changed and Visual Studio cannot find it.
This happens to me most often when the freeze occurs while I am moving or renaming files in my project (folders too).
The solution?
First, make sure that your project is allowing you to see files that are not "included" in your project.
Second, look through your folders and find any files with an exclamation point before the filename. Fix the missing or renamed file problem. Normally this involves restoring the previous file name or moving files back into the old directory. Try rebuilding and you should be fine!
15 comment(s) so far...
Re: Visual Studio Error: Unable to write to output file...
if it is a build issue with the .pdb -> open it in notepad
it will list the directory it is choking on
By Rob K on
2/25/2009
|
Re: Visual Studio Error: Unable to write to output file...
Great tip! I will have to try that the next time this happens. So far, it hasn't happened since I post this. :)
By Will on
2/25/2009
|
Re: Visual Studio Error: Unable to write to output file...
The tip was really helpful. I did notice that it was having problem with loading a file. I removed that file from the project in notepad and it got resolved.
Thanks.
By Praba on
8/24/2009
|
Re: Visual Studio Error: Unable to write to output file...
This worked perfectly fine, my default.aspx.vb file was missing which was created by default and I just remove the .aspx file.
By vishal on
3/8/2010
|
Re: Visual Studio Error: Unable to write to output file...
Great! This helped a lot and saved me sleepless nights!! :)
By Ama on
4/27/2010
|
Re: Visual Studio Error: Unable to write to output file...
Thanks guys. I had the same issue and this worked fine. thankx
By Mthuthuzeli on
8/27/2010
|
Re: Visual Studio Error: Unable to write to output file...
This is still an issue in Visual Studio 2010. You'd think it would be easy to fix the error message.
By Patrick Szalapski on
10/21/2010
|
Re: Visual Studio Error: Unable to write to output file...
If using source control, make sure you check in all the files that were created since the last build. I found this by forgetting to check a file in, and received this error condition.
By Robert G on
12/24/2010
|
Re: Visual Studio Error: Unable to write to output file...
I was stuck for 5 hrs thinking what could be the problem. After I noted your post my issue got fixed. A very nice and elaborate post. Thanks much!
Anirban
By Anirban Kundu on
2/4/2011
|
Re: Visual Studio Error: Unable to write to output file...
Thanks!!!!
By Pete on
3/4/2011
|
Re: Visual Studio Error: Unable to write to output file...
ahhhhh hahahahahah! Thank you! The little bugger was hiding but once I found him it worked. Thank you!
By Tony B on
3/7/2011
|
Re: Visual Studio Error: Unable to write to output file...
Uh... You're welcome? Not sure if that was a spam comment, or not... :D
By Will on
3/11/2011
|
Re: Visual Studio Error: Unable to write to output file...
Worked like a charm..default.aspx.vb was hiding..
By Vish on
4/8/2011
|
Re: Visual Studio Error: Unable to write to output file...
Great! Thanks!
By DyegoX on
7/26/2011
|
Re: Visual Studio Error: Unable to write to output file...
THANK YOU! I never even considered Googling this error as I usually can fix it myself, but today I encountered the error caused by what you say here, and I could not fix it. So thank you!
By jasmine2501 on
1/19/2012
|