Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.
Options

Read XML-File on Hololens-deploy DllNotFoundException

Based on this post
https://forums.hololens.com/discussion/comment/7133/#Comment_7133
I tried to read an XML-File on Hololens deploy. But when I deploy the Project, I get this 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 Microsoft.Win32.UnsafeNativeMethods+<>c.<.cctor>b__9_0 () [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 
  at Assets.Scripts.TimeValueDataLoader.GetTimeValueData () [0x00000] in <00000000000000000000000000000000>:0 
  at Assets.Scripts.TimeValueDataLoader.GetTimeValueItemsAsList () [0x00000] in <00000000000000000000000000000000>:0 
  at Assets.Scripts.TimeValueDataLoader.GetTimesAsList () [0x00000] in <00000000000000000000000000000000>:0 
  at TimeLineCalculator.Start () [0x00000] in <00000000000000000000000000000000>:0 

(Filename: currently not available on il2cpp Line: -1)

This is my code:

public TimeValueData GetTimeValueData()
        {
            XmlSerializer serializer = new XmlSerializer(typeof(TimeValueData));
            Stream stream = null;
#if WINDOWS_UWP
            Task task = new Task(
            async () =>
            {
                StorageFile xmlFile = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///Data/dates_and_values.xml"));
                XmlDocument xdoc = await XmlDocument.LoadFromFileAsync(xmlFile);
                Console.WriteLine("XML-Dokument wurde erstellt!");
                string xmlStr = xdoc.GetXml();
                stream = new FileStream(xmlStr,FileMode.Open);

            });
            task.Start();
            task.Wait();
#else
            stream = new FileStream(XML_FILE_PATH, FileMode.Open);
#endif
            TimeValueData timeValueDataFromXml = serializer.Deserialize(stream) as TimeValueData;
            stream.Close();
            return timeValueDataFromXml;
        }

Can anybody help me with this?

Sign In or Register to comment.