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.

Hololens - Unity Plugin - Websockets - Can not load System.Runtime.WindowsRuntime on device.

Hi,

I'm getting the following runtime error when trying to create a websocket:

FileLoadException: Could not load file or assembly 'System.Runtime.WindowsRuntime, Version=4.0.11.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

I'm using the MessageWebSocket class from the Windows.Networking.Sockets namespace. I have everything conditionally compiling with the NETFX_CORE symbol so it should only work/be called from windows platforms.

Not 100% sure but I think it's finding the dll, just the wrong version.

Any suggestions on how to get the correct dll on the device or is there something I can update in my Unity project (or the generated Visual Studio solution from Unity Build).

Tagged:

Answers

  • @longda Did you figure this out? I have the exact same issue.

  • I found a solution. In the NuGet package manager for my plugin project I downgraded the Microsoft.NETCore.UniversalWindowsPlatform package to version 5.0.0. This is the same version that the exported solution from Unity will use.

    Of course you could also do the reverse, upgrade the package in the exported solution, but this has to be done every time a new solution is exported from Unity.

  • You may be interested in this custom, open source solution on GitHub: https://github.com/DynaSpan/MixedRealityNetworking

  • Thank you so much @roelkok !!! I was having the same issue as @longda and your suggestion worked very well for me. A+++ would forum-search again.

Sign In or Register to comment.