Last post Nov 10, 2009 06:05 PM by carol123
Dec 12, 2008 10:08 PM|JustWantAnAnswer|LINK
One of four projects (two web pages and two webservices) in a solution, and today it starts doing this, unable to complete a build because it says it can't write to the debug version of the dll. But, if I look in ....\debug\... the file is there, did get
writen there at the same time I did the build, so this is apparently a spurious error hiding some other kind of error.
Any suggestions on how to get moving again. I've cleaned and rebuilt dozens of times, and shut down and rebooted the machine a couple of times. When I do a clean, the pdb file in question is deleted. And whether I build or rebuild, the file is created
again, but the system is reporting that it couldn't write to it as a fatal error to the build process.
I found a post talking about adding some code to delete this guy to the build events, but I don't have any build events in my project.
Visual Studio 2008, VB, this particular project is a web service, target is asp.net 3.5, though in this project nothing really uses anything like that, it's simply a web service that makes database calls. It was working fine, and now it's not working at
all because I can no longer build it.
"unable to write to output file" pdb "false error'
Dec 13, 2008 04:18 AM|Rampidbyter|LINK
It's a pain but you can locate the file, or folder, select them, right-click, and turn off the 'Read only' attribute. After that you can build and it will actually replace the file with your new version.
Dec 15, 2008 09:07 PM|JustWantAnAnswer|LINK
The file is not marked read only. The file in fact does get written to, but the error comes up anyway, even though the file was successfully created.
If I do a clean, the file is erased. When I then do a build it gets written (not in a read only state), but that does not stop the error from popping up.
Of course, now that I let the machine rest over the weekend, it's working again... However, it's once again got the problem that I was trying to fix when the other one occurred. That'll be another post though.
Apr 22, 2009 04:51 PM|wiidotnet|LINK
I know this is an old post but I didn't see an answer for the question itself other than the issue resolving itself. Hopefully my response will help someone in the future.
I find that this issue tends to come up when users have some type of source control plug in with Visual Studios. There might be a file that is linked in the vsproj file that is physically missing in the project directory (physically in your inetpub or whatever
directory you keep your project in).
What you can do is either get the file and put it in your project directory, or remove the reference to the file in the vsproj file. The building/rebuilding of the solution might be labelled as "dependent" on the file thus failing to rebuild.
To prevent this in the future, make sure developers are not committing their vsproj files into source control without having committed their new file. I'm going to guess that the user above updated his/her solution again and received the missing file thus
being able to build again.
May 14, 2009 07:31 PM|JustWantAnAnswer|LINK
Yes, I think that is probably the heart of the problem. The integration between Visual Studio and Visual Source Safe is very poorly thought out. Generated files should never be included in the source control, but all too often they get pulled in without
the user being aware of it. the problem is not so much not checking in project files as it is source safe grabbing generated files. There is no possible reason why a pdb file should be saved in source control...
Nov 10, 2009 06:05 PM|carol123|LINK
This works. Removed the references of the files which I don't have and it worked.
Thanks a lot for you thought to post the solution.