Quantcast

Passing assemblies to mono runtime

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Passing assemblies to mono runtime

Andreas Jung
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
_______________________________________________
Mono-list maillist  -  [hidden email]
http://lists.dot.net/mailman/listinfo/mono-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Passing assemblies to mono runtime

Slide

It looks like your assemblies that are references are not in the same directory as the exe. Visual studio will copy references, but mcs won't (and shouldn't) do that. If you want something similar to visual studio, use mono develop.


On Sat, Apr 1, 2017, 09:12 Andreas Jung <[hidden email]> wrote:
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
_______________________________________________
Mono-list maillist  -  [hidden email]
http://lists.dot.net/mailman/listinfo/mono-list

_______________________________________________
Mono-list maillist  -  [hidden email]
http://lists.dot.net/mailman/listinfo/mono-list
Loading...