Tag Archives: System.Xml.XmlException: There is no Unicode byte order mark. Cannot switch to Unicode.

System.Xml.XmlException: There is no Unicode byte order mark. Cannot switch to Unicode.

System.Xml.XmlException: There is no Unicode byte order mark. Cannot switch to Unicode.

The path passed to the function is load file C: \ workspace \ GitHub \ chuck Lu \ chuck fork \ fatantelope \ fatantelope. Commandline \ bin \ debug \.. \.. \.. \ consoleapp1 \ sample \ source.xml failed

It should be handled with getfullpath

 

<?xml version=”1.0″ encoding=”utf-8″?& gt; The code at the beginning of the file does not match the code saved in the file itself, so an error is reported