Search Unity

XML error when serializing for Windows 10 Universal Store

Discussion in 'Scripting' started by Jabbah76, Apr 24, 2017.

  1. Jabbah76

    Jabbah76

    Joined:
    Jul 29, 2015
    Posts:
    6
    Hello,

    We have successfully released our Unity game on the Google Play Store and now I'm working on getting it in the Windows 10 Universal Store. I've succeeded in creating a Windows 10 Visual Studio solution and creating an appx file. When running the app it seems I'm running into the following Unity bug:

    https://issuetracker.unity3d.com/is...xception-thrown-when-running-the-il2cpp-build

    Is there a workaround for this bug? I've tried another XML serializer but didn't work. Or do I have to go through the horrible task of loading and saving my XML manually?

    Thanks for any help!

    Unity: 5.6.0f3
    Scripting backend: IL2CPP
    .NET version: 4.6

    The app throws the following exception:

    DllNotFoundException: Unable to load DLL 'kernel32.dll': The specified module could not be found.
    at Microsoft.Win32.UnsafeNativeMethods.GetModuleHandle (System.String moduleName) [0x00000] in <00000000000000000000000000000000>:0
    at Microsoft.Win32.UnsafeNativeMethods.DoesWin32MethodExist (System.String moduleName, System.String methodName) [0x00000] in <00000000000000000000000000000000>:0
    at Microsoft.Win32.UnsafeNativeMethods._IsPackagedProcess () [0x00000] in <00000000000000000000000000000000>:0
    at System.Func`1[TResult].Invoke () [0x00000] in <00000000000000000000000000000000>:0
    at System.Lazy`1[T].CreateValue () [0x00000] in <00000000000000000000000000000000>:0
    at System.Lazy`1[T].LazyInitValue () [0x00000] in <00000000000000000000000000000000>:0
    at System.Lazy`1[T].get_Value () [0x00000] in <00000000000000000000000000000000>:0
    at System.Xml.Serialization.TempAssembly.LoadGeneratedAssembly (System.Type type, System.String defaultNamespace, System.Xml.Serialization.XmlSerializerImplementation& contract) [0x00000] in <00000000000000000000000000000000>:0
    at System.Xml.Serialization.XmlSerializer..ctor (System.Type type, System.String defaultNamespace) [0x00000] in <00000000000000000000000000000000>:0
    at System.Xml.Serialization.XmlSerializer..ctor (System.Type type) [0x00000] in <00000000000000000000000000000000>:0
     
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,935
    This bug only exists with the .NET 4.6 class libraries. If you can switch to .NET 2.0, that should correct the issue.
     
  3. Jabbah76

    Jabbah76

    Joined:
    Jul 29, 2015
    Posts:
    6
    Unfortunately, that is not an option. Any other ideas?
     
  4. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,935
    I don't think there is another work around. We will simply need to correct the bug from our side then.
     
  5. Jabbah76

    Jabbah76

    Joined:
    Jul 29, 2015
    Posts:
    6