Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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 /
  • Help Room /
avatar image
0
Question by TiToMoskito · Jun 20, 2021 at 07:15 PM · xmlil2cppmonoxmlserializer

Reading XML on Mono Fails - IL2CPP works?!

Hi,

my game needs to read a xml file, and on IL2CPP and Editor it works without any issues. But when i built it in Mono, i got this stupid errors:

    System.MissingMethodException: Default constructor not found for type System.Diagnostics.SystemDiagnosticsSection
       at System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic) [0x0007b] in <f3b441e34e334f86b90d32f3b50d01cd>:0 
       at System.RuntimeType.CreateInstanceSlow (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00009] in <f3b441e34e334f86b90d32f3b50d01cd>:0 
       at System.RuntimeType.CreateInstanceDefaultCtor (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00027] in <f3b441e34e334f86b90d32f3b50d01cd>:0 
       at System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic) [0x0002c] in <f3b441e34e334f86b90d32f3b50d01cd>:0 
       at System.Configuration.ConfigInfo.CreateInstance () [0x00026] in <009ae07fc98f4cf182f2f0676c4c5dd9>:0 
       at System.Configuration.SectionInfo.CreateInstance () [0x00000] in <009ae07fc98f4cf182f2f0676c4c5dd9>:0 
       at System.Configuration.Configuration.GetSectionInstance (System.Configuration.SectionInfo config, System.Boolean createDefaultInstance) [0x0001c] in <009ae07fc98f4cf182f2f0676c4c5dd9>:0 
       at System.Configuration.ConfigurationSectionCollection.get_Item (System.String name) [0x0002c] in <009ae07fc98f4cf182f2f0676c4c5dd9>:0 
       at System.Configuration.Configuration.GetSection (System.String sectionName) [0x0001e] in <009ae07fc98f4cf182f2f0676c4c5dd9>:0 
       at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection (System.String configKey) [0x00006] in <009ae07fc98f4cf182f2f0676c4c5dd9>:0 
       at System.Configuration.ConfigurationManager.GetSection (System.String sectionName) [0x00005] in <009ae07fc98f4cf182f2f0676c4c5dd9>:0 
       at System.Configuration.PrivilegedConfigurationManager.GetSection (System.String sectionName) [0x00000] in <5ebb2774be7b4e249853ef7dd3b06add>:0 
       at System.Diagnostics.DiagnosticsConfiguration.GetConfigSection () [0x00000] in <5ebb2774be7b4e249853ef7dd3b06add>:0 
       at System.Diagnostics.DiagnosticsConfiguration.Initialize () [0x0002a] in <5ebb2774be7b4e249853ef7dd3b06add>:0 
       at System.Diagnostics.DiagnosticsConfiguration.get_SwitchSettings () [0x00000] in <5ebb2774be7b4e249853ef7dd3b06add>:0 
       at System.Diagnostics.Switch.InitializeConfigSettings () [0x00013] in <5ebb2774be7b4e249853ef7dd3b06add>:0 
       at System.Diagnostics.Switch.InitializeWithStatus () [0x00046] in <5ebb2774be7b4e249853ef7dd3b06add>:0 
       at System.Diagnostics.Switch.get_SwitchSetting () [0x0000a] in <5ebb2774be7b4e249853ef7dd3b06add>:0 
       at System.Diagnostics.BooleanSwitch.get_Enabled () [0x00000] in <5ebb2774be7b4e249853ef7dd3b06add>:0 
       at System.Xml.Serialization.TempAssembly.LoadGeneratedAssembly (System.Type type, System.String defaultNamespace, System.Xml.Serialization.XmlSerializerImplementation& contract) [0x0001a] in <bab9525fff6b49829c609a2865c9287a>:0 
       at System.Xml.Serialization.XmlSerializer..ctor (System.Type type, System.String defaultNamespace) [0x0007e] in <bab9525fff6b49829c609a2865c9287a>:0 
       at System.Xml.Serialization.XmlSerializer..ctor (System.Type type) [0x00000] in <bab9525fff6b49829c609a2865c9287a>:0 
       at BeardedMonkeys.Utils.XmlDeserializeFile[T] (System.String serializedObject) [0x00001] in E:\Projekte\Unity\RaceProject\Assets\Scripts\Utility\Utils.cs:366
 
       at BeardedMonkeys.MapManager.Initialize () [0x000c0] in E:\Projekte\Unity\RaceProject\Assets\Scripts\Map\MapManager.cs:57
 
     
     CreateInstanceMono(:0)

How do i fix this? (It worked a few days ago...

Comment
Add comment · Show 1
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 TiToMoskito · Jun 20, 2021 at 07:59 PM 0
Share

It seems like someone has a same issue: https://issuetracker.unity3d.com/issues/class-get-stripped-when-using-preserve-attribute-with-mono-backend

0 Replies

· Add your reply
  • Sort: 

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

162 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 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

How to fix apps containing an unsafe implementation of TrustManager 0 Answers

How do I check for the IL2CPP scripting backend/setting? 3 Answers

xml file read as MonsterCollection.cs 0 Answers

A simple 2D unity game facing Jerks/Lags 0 Answers

Read XML file and assign value to variables 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