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

Connecting to local network ActiveMQ

Hello,

I am currently encountering problems when tryintg to connect my HoloLens application with ActiveMQ. Everything works fine when in the Unity Editor but when running through the HoloLens, it immediately crashes. Is there anything special on how I need to import external DLLs through Unity?

Here is how the problem happens :

`
using Apache.NMS;
using Apache.NMS.Util;
using Apache.NMS.ActiveMQ;

IConnectionFactory factory = new ConnectionFactory("tcp://192.168.X.X:61616"); `

Error message :
`'MixedRealityToolkit-Unity.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Data\Users\DefaultAccount\AppData\Local\DevelopmentFiles\MixedRealityToolkit-UnityVS.Debug_x86.holo\System.dll'. Module was built without symbols.
Exception thrown: 'System.TypeLoadException' in Apache.NMS.ActiveMQ.dll
'MixedRealityToolkit-Unity.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Data\Users\DefaultAccount\AppData\Local\DevelopmentFiles\MixedRealityToolkit-UnityVS.Debug_x86.holo\System.Diagnostics.StackTrace.dll'. Cannot find or open the PDB file.
at Apache.NMS.ActiveMQ.ConnectionFactory..ctor(Uri brokerUri, String clientID)
at Apache.NMS.ActiveMQ.ConnectionFactory..ctor(Uri brokerUri)
at ActiveMQManager.Start()

(Filename: C:/buildslave/unity/build/artifacts/generated/Metro/runtime/DebugBindings.gen.cpp Line: 51)

Could not load type 'System.ICloneable' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.

(Filename: C:/buildslave/unity/build/artifacts/generated/Metro/runtime/DebugBindings.gen.cpp Line: 51)`

To get this far, I had to enable the "Do not process" checkbox in Unity, otherwise I got a Serialization Weaver error like this :

UnityException: Failed to run serialization weaver with command "Temp\StagingArea\Data\Managed\Apache.NMS.dll" "-pdb" "-verbose" "-unity-engine=Temp\StagingArea\Data\Managed\UnityEngine.dll" "Temp\StagingArea\TempSerializationWeaver" "-lock=UWP\project.lock.json" "-additionalAssemblyPath=C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.15063.0\Facade" "-additionalAssemblyPath=C:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.ApplicationModel.Calls.CallsVoipContract\1.0.0.0" "-additionalAssemblyPath=C:\Program Files (x86)\Windows etc etc.

Here are my hypothesis :
1. I need some magic trick that is currently unknown to me if I want to use external DLLs in HoloLens.
2. HoloLens and Dlls(At least the Apache.NMS ones) were never meant to be together.

I also tried
[DllImport("Apache.NMS.ActiveMQ")] private static extern IConnectionFactory ConnectionFactory(Uri brokerUri);
Which also resulted in errors, with AssemblyConverter.exe this time.

Anyone got any luck with similar problems? Or other ways to make a Unity Hololens talk to ActiveMQ?

Answers

  • Options

    Hey man did you find out how you could use ActiveMQ.NMS because I have problems as well, if you have another software solution I am interested as well.

    Thanks in advance

Sign In or Register to comment.