[Mono-list] Passing assemblies to mono runtime

Andreas Jung lists at zopyx.com
Sat Apr 1 16:12:37 UTC 2017


I have Visual Studio project that I am trying to get running with Mono.

I could install all dependencies using

mono nuget.exe install
and compile my application using

mcs -r:RestSharp.105.2.3/lib/net46/RestSharp.dll \
         -r:JWT.1.3.4/lib/3.5/JWT.dll  \
         -r:jose-jwt.2.2.0/lib/net461/jose-jwt.dll \
         -r:Newtonsoft.Json.10.0.1/lib/net45/Newtonsoft.Json.dll \
         Program.cs
Now I am trying to run the application using

mono Program.exe

Unhandled Exception:
System.IO.FileNotFoundException: Could not load file or assembly 
'Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, 
PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies.
File name: 'Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, 
PublicKeyToken=30ad4fe6b2a6aeed'
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: 
Could not load file or assembly 'Newtonsoft.Json, Version=10.0.0.0, 
Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its 
dependencies.
File name: 'Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, 
PublicKeyToken=30ad4fe6b2a6aeed'
So how do you pass the path to the assemblies to the Mono runtime 
similar to the compiler?

I tried to set $MONO_PATH but this is not working and not recommended 
for Production.

The overall question how the mcs compiler and the mono runtime could get 
the information directly from the installed packages (using nuget.exe).

Andreas


More information about the Mono-list mailing list