I’m trying to get GRPC to work on Unity on HoloLens2.
Current status:
- Manually compiled a windows arm64 version of grpc_csharp_ext.dll (it came out in version 1.29.1). The reason for manually compiling: the grpc binaries do not include a windows arm64 version of grpc_csharp_ext.dll.
- Used this version of unity grpc package: https://packages.grpc.io/archive/2019/10/8853754e8caa0b2ffb3ab0e25514f3f7612ebf7a-d6090f79-7b70-429d-a477-9df736e4941a/index.xml. This is listed as 2.25.0, which I’m assuming refers to grpc 1.25.0
- Build works in unity, and in the il2cpp project. The current exception on the HoloLens2 is System.DllNotFoundException - ‘grpc_csharp_ext’: not found (even though I can see that it is in the same dir as the application’s exe file).
Any help would be much appreciated.
6096606–662580–exception.txt (1.28 KB)
To try and isolate the problem I’ve created a c++ dll with a single function in it, and then used that function in a C# dll. I build the c++ dll in arm64 and then imported these two dlls into Unity and built in Unity, then built the IL2CPP and then deployed to HoloLens2.
It has the exact same issue - System.DllNotFoundException: Unable to load DLL ‘TestCppDll.dll’: The specified module could not be found.
Note: I imported two versions of my simple c++ dll to Unity - one that is x64 and another that is arm64. The dlls’ configurations in Unity are attached as images. And running the project in Unity works just fine.
Also trying to get HoloLens2 with GRPC on Unity.
I started creating a native dll (C++) with just a function like you. I included that library (platform ARM 64) in my Unity project directly. At first, I had the same exception “unable to load DLL” on HoloLens 2. It worked on HoloLens 2 when I built the library with /MT option (In Visual Studio – Project properties – C/C++ – Code generation – Runtime library – Multi-thread (/MT)). See explanation in
https://stackoverflow.com/questions/52891654/hololens-cannot-pinvoke-native-dll-with-error-dll-not-found
Maybe you have the same problem with your compilation of grpc_csharp_ext.dll
1 Like