I am trying to add the following NuGet packages to my project
<package id="AsyncIO" version="0.1.69" targetFramework="net47" />
<package id="NetMQ" version="220.127.116.11" targetFramework="net47" />
In the .csproj
<Reference Include="AsyncIO, Version=0.1.69.0, Culture=neutral, PublicKeyToken=44a94435bd6f33f8, processorArchitecture=MSIL">
<Reference Include="NetMQ, Version=18.104.22.168, Culture=neutral, PublicKeyToken=a6decef4ddc58b3a, processorArchitecture=MSIL">
This works on Linux but when creating the APK these assemblies are not copied
so the Android version crashes.
The same is true for System.Threading.Tasks.Dataflow
The mono crash log puts this in the logs:
The following assembly referenced from .mono/assemblies/Debug/Sample.dll could not be loaded:
Assembly: System.Threading.Tasks.Dataflow (assemblyref_index=2)
Public Key: b77a5c561934e089
The assembly was not found in the Global Assembly Cache, a path listed in the MONO_PATH environment variable, or in the location of the executing assembly (/.mono/assemblies/Debug/).
(And the same for the other two packages)
Other 3rd party packages work fine. And NetMQ has been confirmed to work on Android with Mono and even Unity (It's a 100% managed implementation)
Any idea how to solve this?
Turns out there is more going on than I expected.
See sometimes when I export the APK the libraries that could not be found
can be found and everything works and then other times other libraries
that could be found before cannot be found.
This happens without code changes.