Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by me_Stoffel · Jun 06, 2018 at 10:25 AM · xmlil2cppxmlserializerwindows store

System.Xml.Serialization in UWP with IL2CPP

Hey,

I'm trying to port an existing application to UWP with the IL2CPP backend. It works fine mostly, however we make use of the System.Xml.Serialization and this seems to crash with this setup. I found a related issue here: Unity Issue Tracker

Are there known alternatives or workarounds for this? I basically just need to de-/serialize XML files. I tried ZeroFormatter (see here), but can't yet find a way to give it the string/bytes from a human readable XML file as input.

Thanks and best regards

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

4 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by JoshPeterson · Jun 06, 2018 at 11:57 AM

You should not need a work around for this issue, at least not in Unity 2018.1 or later. I incorrectly marked that bug report as Won't Fix - sorry about that.

The problem here is managed code in System.Xml.dll that does not place nicely with an AOT compiler (like IL2CPP).

We've corrected this issue in 2018.1 and 2018.2. In those versions of Unity, you will need to use the .Net Standard 2.0 Api Compatibility Level to get the AOT-friendly version of System.Xml.dll. In Unity 2018.3 we will also have an AOT-friendly version of System.Xml.dll for the .NET 4.x Api Compatibility Level.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
1

Answer by CasiaLab · Sep 21, 2018 at 02:11 AM

@JoshPeterson Will it be for the official release because I tried the beta and the problem still seems to persis? .

Comment
Add comment · Show 10 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image JoshPeterson · Sep 21, 2018 at 11:55 AM 0
Share

Which version did you try?

avatar image Deeeds JoshPeterson · Sep 21, 2018 at 01:52 PM 0
Share

Hey Josh! sorry to bother you here. I was doing some testing of 2018.3.0b2 and got a consistent crash, instantly, in IL2CPP builds. $$anonymous$$ac. It's so instant there's no reporter come up. Where/how/what you want me to send you to help, if what I have occurring is helpful.

Cheers, and keep up the good work. You're a legend. Single handedly keeping my faith in Unity as an entity ;)

avatar image JoshPeterson Deeeds · Sep 21, 2018 at 02:29 PM 0
Share

Please drop us a bug report from the Editor. If you can include the project, that will help us reproduce it more quickly, and hopefully fix it.

avatar image CasiaLab JoshPeterson · Sep 23, 2018 at 10:57 PM 0
Share

I am currently using the 2018.3.0b2 version of Unity

avatar image JoshPeterson CasiaLab · Sep 24, 2018 at 11:54 AM 0
Share

This should be working in that version, but maybe you have found a different issue. Can you send us a bug report?

Show more comments
avatar image
0

Answer by me_Stoffel · Jun 06, 2018 at 12:12 PM

Aah, thanks, that's very interesting to hear. I actually was using Unity 2017.3 and just upgraded to 2018.1, but using the .NET 4.x api compability level. Will try to go back to 2.0 then and test, if it works with that :) Is the fix for .NET 4.x a save thing to expect for 2018.3?

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image JoshPeterson · Jun 06, 2018 at 12:15 PM 0
Share

Yes, this will be corrected in the .NET 4.x Api Compatibility Level only in Unity 2018.3, not before.

avatar image
0

Answer by ANTONBORODA · Aug 01, 2018 at 02:56 PM

So currently, there's no reason to use .NET 4.x is you are doing anything related to serialization? Changes aren't going to be back-ported to 2013.2, right? Only 2013.3 will get a fix?

Comment
Add comment · Show 8 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image JoshPeterson · Aug 01, 2018 at 03:00 PM 0
Share

Yes, only 2018.3 will get the fix.

avatar image ANTONBORODA JoshPeterson · Aug 01, 2018 at 03:02 PM 0
Share

That's harsh :(

avatar image JoshPeterson ANTONBORODA · Aug 01, 2018 at 03:04 PM 0
Share

The changes are too risky for a back port. But you can use the .Net Standard 2.0 Api Compatibility Level, which should have just about everything you need for most games. Is there something specific you need in the .NET 4.x Api Compatibility Level?

Show more comments
avatar image VirZOOM · Nov 05, 2018 at 10:34 PM 0
Share

The specific thing we'd like to use with .NET 4.x without breaking Xml serialization on UWP is Tasks, for the only websocket server library (Fleck) that works with UWP. It looks like less risk to try an Xml alternative than to port our already tested/optimized app to 2018.3.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

87 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Confusion with process of XML setup 0 Answers

Asset Bundle code stripping / link.xml not working 1 Answer

Problems with the XML Serializer 1 Answer

unity and xml question 1 Answer

Parse XML to Vector3 (and other objects you don't control) 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges