Search This Blog

Loading...

Wednesday, February 20, 2008

fatal error CS0041: Unexpected error writing debug information ...'Catastrophic failure '

Well, I got this when I compiled my C# .Net 1.1 project. The full error was:

fatal error CS0041: Unexpected error writing debugging information to file "XXXX\obj\Debug\ATest.pdb" 'catastrophic failure'.

What caused the error?

It was all because the VS 2003 compiler was trying to create a pdb file on a directory that contained such a pdb file which was created by VS 2005, so said the Internet.

So I deleted the pdb file.

Still, the same error occurred.

Confounded, I closed the Visual Studio, opened it again, made a recompile. Same error. I deleted the pdb file again, recompiled, no luck

I fiddled around for half an hour without any result. Out of frustration, I deleted all the bin and obj folder. And it worked.

Puzzled, I read the troubleshooting guide and the error message again. Well, the error message said that error occurred in \obj\Debug\ATest.pdb. No wonder, I deleted the pdb file in \bin\Debug folder.

Sigh!