beta9: System.Xml.Serialization doesn't exist anymore

I get this error with the Script Updater:

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?

1 Like

Oh I forgot! I saw that on a previous beta (5?).

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!)

HTH

Yeah, I’m the author of Build Report Tool. I’m trying to figure out why it’s not working anymore.

(yes, I remember you :slight_smile: It’s still very useful, thx!)

Hi @AnomalusUndrdog

Can you share Editor.log so I can take a look?

Thanks

Adriano

Hi, here it is: http://pastebin.com/N5Gm76d7

The error starts in line 973

Thanks @AnomalusUndrdog

Can you share “Assets\gmcs.rsp” ?

Also, it looks like you hit a bug:

If you can share that project I can investigate.

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.

Best

Adriano

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

2971694–220742–gmcs.zip (200 Bytes)

Hey thanks.

I’ll take a look on it

@AnomalusUndrdog

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

Adriano

Hi Adriano,

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.

Hum…I’ve checked on my dev branch so the bug may already been fixed indirectly.

Let me try with latest beta.

@AnomalusUndrdog

Indeed the crash is reproducible with 5.6b9

The issue is the same as reported in 38685 and is already fixed in our main dev branch (I’ll port it back to 5.6)

BTW: I’ve updated your issue (884554) to reflect only the XML resolution failures (already fixed in my dev branch)

Best

Adriano

2 Likes

Looks like its yet there in beta10 :frowning:

Hello,

For information, the issue is still here in beta11.

“error CS0234: The type or namespace name ‘Serialization’ does not exist in the namespace ‘System.Xml’ (are you missing an assembly reference?)”

@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.

Hi @Gaurav-Gulati
Are you talking about the failures to resolve System.XML types?

If so, this is not a big deal and should not prevent you from entering in play mode.

Best

Adriano

@Vagaus Yes,talking about this “error”,that i get in unity editor, unity5.6 beta 11(unity 5.5 works fine yes) :

“error CS0234: The type or namespace name ‘Serialization’ does not exist in the namespace ‘System.Xml’ (are you missing an assembly reference?)”

So, how i should get it solved?

Thanks in Advance

it should be fixed in 5.6 rc1. If you can still reproduce it there let me know and I’ll double check

Adriano