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

How to properly use ActiveMQ in a HoloLens Unity app?

Hello, I am currently building a Unity App for the HoloLens which needs to communicate with ActiveMQ. To do this, I need external dlls,. I added in a Plugins folder the following files Apache.NMS.dll, Apache.NMS.ActiveMQ.dll and Ionic.Zlib.dll.

Everything runs fine when in the editor but problems arise when building the app :
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" etc etc.

To fix this I checked the box "Do Not Process" and things compile fine. I then run my app in the HoloLens through the Debug mode and I get an error at this point in my code :
` Uri brokerUri = new Uri("activemq:tcp://192.168.X.X:61616/");

       factory = new ConnectionFactory(brokerUri);`

Error :
`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)
`
I also tried [DllImport("Apache.NMS")] lines in my code which resulted in errors too.

Here are my hypotheses :
1. There is a precise process on how to import dlls and I cannot seem to understand it.
2. HoloLens does not like at all external dlls.

Does anybody have tips on using external dlls? Experience on integrating ActiveMQ and HoloLens? Recommendations on how to replace this?

Thank you for your help.
LaurenceO

Sign In or Register to comment.