Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error while loading project: Attribute Include is unrecognized

After merging two branches the Visual Studio has suddenly problems with loading a project. When I try to reload, I always get the error

The attribute "Include" in element Reference is unrecognized.

I have no idea why this happened... how can I get the solution to load the project again? Has anyone encountered this error message before and know what I have to look for to find the problem?

The .csproj doesn't really look corrupt on the first sight...

Thanks in advance

like image 272
xeraphim Avatar asked Sep 26 '14 13:09

xeraphim


2 Answers

I found the error... there was a merge conflict with a Reference-Tag with no close-tag because it was deleted while merging.

like image 168
xeraphim Avatar answered Oct 15 '22 10:10

xeraphim


when you build the csproj file with MSBuild you get the line-number on which the error occurs. This is unfortunately not visible in VisualStudio.

  • Open the Develop Commnand Prompt for Visual Studio
  • Navigate to the folder which contains the csproj file
  • Run MSBuild

In the error, it contains the line-number with the error in the csproj file. This helped me fixing the file after a GIT merge

like image 29
Robrecht Jacques Avatar answered Oct 15 '22 09:10

Robrecht Jacques