Attention: We are retiring the ASP.NET Community Blogs. Learn more >

CS0042 errors anyone?

I am getting a CS0042 error while trying to compile a solution I did not create: Unexpected error creating debug information file 'a filename with a .PDB extension' -- 'Unspecified error ' Can anyone advise me on exactly how CS0042 errors come to exist so I can solve this little problem and get this thing running?

6 Comments

  • its because a previous version of assembly is loaded into your process space

  • If so, how does it get loaded in such a way as to cause this error? The error occurs even if I completely reboot. It does not affect the release build for this project, just the debug build. Someone else wrote the code and I have volunteered to do a few things with it - provided that I can get it to build.



    I have seen some news group posts that suggest the problems may have something to do with date-time stamps on files within the projects but I have not yet seen an adequate explanation.



    I would like a thorough explanation (preferably from someone knowledgeable at Microsoft) as to the full "meaning" of the CS0042 error.

  • Try delete all files from directory:

    <project root>\obj\Debug

  • We had this problem and it went away when everyone started using the identical version of the solution file.



    It was a problem when one person was using a different solution because he had a different set of projects that he was working with than the rest of us.

  • deleting the all objects under obj folder did the trick

  • i renamed the file and it solved the problem.

Comments have been disabled for this content.