Quantcast
Channel: Recent Discussions — Mixed Reality Developer Forum
Viewing all articles
Browse latest Browse all 10543

How to properly use ActiveMQ in a HoloLens Unity app?

$
0
0

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


Viewing all articles
Browse latest Browse all 10543

Trending Articles