Skip to content

Many System.Xml.XmlException: There is no Unicode byte order mark. Cannot switch to Unicode exceptions in Unity 2018.3.b{x} #1

@tkaczz

Description

@tkaczz

Console window is spammed with these same messages
System.Xml.XmlException: There is no Unicode byte order mark. Cannot switch to Unicode. at System.Xml.XmlTextReaderImpl.Throw (System.Exception e) [0x00027] in <7fd195060d8c41448694ab221d3b56ca>:0 at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo (System.String res) [0x00017] in <7fd195060d8c41448694ab221d3b56ca>:0 at System.Xml.XmlTextReaderImpl.CheckEncoding (System.String newEncodingName) [0x000ad] in <7fd195060d8c41448694ab221d3b56ca>:0 at System.Xml.XmlTextReaderImpl.ParseXmlDeclaration (System.Boolean isTextDecl) [0x0065c] in <7fd195060d8c41448694ab221d3b56ca>:0 at System.Xml.XmlTextReaderImpl.Read () [0x000c6] in <7fd195060d8c41448694ab221d3b56ca>:0 at System.Xml.Linq.XDocument.Load (System.Xml.XmlReader reader, System.Xml.Linq.LoadOptions options) [0x00016] in <428ab70c13974bd0bcd1eeafc00ea3e2>:0 at System.Xml.Linq.XDocument.Load (System.String uri, System.Xml.Linq.LoadOptions options) [0x0000f] in <428ab70c13974bd0bcd1eeafc00ea3e2>:0 at System.Xml.Linq.XDocument.Load (System.String uri) [0x00000] in <428ab70c13974bd0bcd1eeafc00ea3e2>:0 at CSharpLatest.CsProjectPostprocessor.UpdateProjectFile (System.String csproj, System.String csver) [0x00000] in <d168b503304540e1af1dd3fbda8143ac>:0 UnityEngine.Debug:LogError(Object) CSharpLatest.CsProjectPostprocessor:UpdateProjectFile(String, String) CSharpLatest.CsProjectPostprocessor:OnGeneratedCSProjectFiles() CSharpLatest.Bootstrap:Main() UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes()

And this
System.Xml.XmlException: There is no Unicode byte order mark. Cannot switch to Unicode. at System.Xml.XmlTextReaderImpl.Throw (System.Exception e) [0x00027] in <7fd195060d8c41448694ab221d3b56ca>:0 at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo (System.String res) [0x00017] in <7fd195060d8c41448694ab221d3b56ca>:0 at System.Xml.XmlTextReaderImpl.CheckEncoding (System.String newEncodingName) [0x000ad] in <7fd195060d8c41448694ab221d3b56ca>:0 at System.Xml.XmlTextReaderImpl.ParseXmlDeclaration (System.Boolean isTextDecl) [0x0065c] in <7fd195060d8c41448694ab221d3b56ca>:0 at System.Xml.XmlTextReaderImpl.Read () [0x000c6] in <7fd195060d8c41448694ab221d3b56ca>:0 at System.Xml.Linq.XDocument.Load (System.Xml.XmlReader reader, System.Xml.Linq.LoadOptions options) [0x00016] in <428ab70c13974bd0bcd1eeafc00ea3e2>:0 at System.Xml.Linq.XDocument.Load (System.String uri, System.Xml.Linq.LoadOptions options) [0x0000f] in <428ab70c13974bd0bcd1eeafc00ea3e2>:0 at System.Xml.Linq.XDocument.Load (System.String uri) [0x00000] in <428ab70c13974bd0bcd1eeafc00ea3e2>:0 at CSharpLatest.CsProjectPostprocessor.UpdateProjectFile (System.String csproj, System.String csver) [0x00000] in <d168b503304540e1af1dd3fbda8143ac>:0 UnityEngine.Debug:LogError(Object) CSharpLatest.CsProjectPostprocessor:UpdateProjectFile(String, String) CSharpLatest.CsProjectPostprocessor:OnGeneratedCSProjectFiles() UnityEditor.SyncVS:SyncVisualStudioProjectIfItAlreadyExists()

As a result LangVersion is still stucked on 7.

How to reproduce:

  1. Add incremental compiler, at the moment I had
    "com.unity.incrementalcompiler": "0.0.42-preview.24",
  2. Import package with newest version of your app
  3. Console window is spammed with prevoiusly described messages
  4. Assembly(...).csproj is still at LangVersion 7, because bug still exist

Maybe that can help
https://stackoverflow.com/questions/29915467/there-is-no-unicode-byte-order-mark-cannot-switch-to-unicode

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions