I have a problem with my Visual Studio installation.
To reproduce it I have created a new blank solution and then:
Visual Studio fails to create it an I get this message:
The element <#text> beneath element <Project> is unrecognized.
Any ideas how to fix that?
You will get such an error if csproj contains invalid XML.
I encountered this error when I accidentally removed <!--
inside csproj file and leave -->
:
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
This doesn't address the OP's precise problem, but I stumbled across this question when I had a legitimate XML break. Sometimes, these are just really hard to spot errors, even with good IDEs.
I had to go through a diff of a ~~800 line XML file until I spotted a closing bracket with an extra >
.
I wasn't able to spot it in VS2015, VS Code, Notepad++, and even WC3's automated checks -- it wasn't until I did a diff between the before and after when I noticed it. Sometimes the linters just don't catch stuff, or the suspiciously flagged area is so tiny, you miss it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With