The line of code in question was a using directive at the top of an editor script:
using System.Xml.Serialization;
I have a lot more errors but mostly just related to that error, complaining about XmlRoot, XmlRootAttribute, etc.
The script with the error is an editor script, although the project is set to build to Windows standalone. The Scripting Backend is Mono2x (it’s the only option available), and the Api Compatibility Level is set to “.NET 2.0 Subset”. Changing it to “.NET 2.0” still gives the same error.
Is there anything special I need to do to fix this? Or is XML serialization really removed from Unity?
I was having so many difficulties at the time, I forgot about that one!
From memory, the error came from the script updater just like you but when I loaded the script in Visual Studio it said everything was fine (so I couldn’t determine a fix). When I cleared the error in unity console, compilation was actually fine so no actual problems. When I re-ran the updater, same error. Couldn’t determine any other problem – just couldn’t run the updater any more.
Same for you?
It /could/ have been Build Report Tool – though I think I removed that previously due to other problems? (I’ll restore it if/once I get everything resolved, of course!)
BTW: failure to resolve types / members are not necessarily an error. Depending on the type/member in question it may cause some updates to not be applied, but never a crash.
That project is about 600 MB which is next to impossible for me to upload. I created a bug report instead with a small attached project inside with that bug. The bug report ticket number is 884554_hus2pirefruvjmde
gmcs.rsp is a text file with the contents:
but I’ve uploaded it here in this post anyway in case you want it
The bug report (884554) does not reproduce the NullReferenceException. (it only reproduces the failures to resolve the XML classes) (but I’ll check that also)
Meanwhile, if your only concern about sharing the original project (the one that you sent the Editor.log reporting a NullReferenceException) is the project size, you could remove all non script assets (i.e, keep only .dll and scripts) and zip the result (usually that is enough to me to debug issues in the updater)
Thanks for looking into it, but that is strange, because opening just now that same small project that I submitted, I do still get the
error after I let the script updater do its job.
If you check the Editor.log attached in that bug report, it should definitely show up there.
All I did for that bug repro project was to create a new empty project in Unity 5.6.0b9, get the latest version of Build Report Tool from the Asset Store, then let the script updater proceed.
@Vagaus Please provide a workaround or a patch atleast? You mentioned that its been already fixed in your dev branch after beta 9,but its not yet commited to newer beta’s? This issue wont let us even play the game in unity editor itself.