Unable to read project file , . . .corrupt file


  • I'm getting the following message when I try to open a SL4 project that I last worked on several months ago.  Specifically there are two lines:

    d:\..\ProjName.Web\ProjName.Web.csproj : error : Unable to read the project file 'ProjName.Web.csproj'.

    d:\..\ProjName.Web\ProjName.Web.csproj.user: The project file could not be loaded.  Root element is missing.

    When I close out of VS2010 and look at the files in notepad++ by dragging

    ProjName.Web  and ProjName.Web.csproj to notepad++

    I note that Notepad identifies these files as:

    ProjName.Web.csproj and ProjName.Web.csproj.user

    interestingly, the ProjName.Web opens in notepad as ProjName.Web.csproj - it appears to be a clean xml file.  The other file, is opened in Notepad++ as ProjName.Web.csproj.user and appears to be corrupt (it is a long line of NUL)

    Comparing the results with a new SL4 project, it appears the ProjName.Web.csproj.user file is corrupt.  I can't blow it away, because it is the Project solution file.  I've tried to switch it with a new SL4 project (changing the obvious project names), but that doesn't seem to work.

    Can some offer suggestions on how to recreate it so that I don't have to redo the whole application?

    Thanks for your help!

    Saturday, July 16, 2011 2:29 PM


  • The .user file is actually not necessary and you can safely delete the file.  If you're unsure of the safety, try it out with a new project or just back it up first.  Based on the error message you're receiving though, I'm not 100% sure it will resolve your problem rather than just eliminate a suspect.

    Saturday, July 16, 2011 2:41 PM