Mono return error: mono mscorlib.dll was not found

孤街醉人 提交于 2019-12-20 05:26:31

问题


I've developed a mono gtk 2.10 application with monodevelop 2.4.

But, when i try to launch the .exe outside my develop machine (about 5 virtual machine) i get ever:

mono mscorlib.dll was not found

Also if i add mscorlib.dll to the app directory, i get the same error.

Where i'm wrong ?


回答1:


It might be that your program was built against a version of the runtime that isn't installed on the other machines.

For instance, If you compiled against 1.1 or 4.0 and your other systems only have 2.0 or 3.5 etc.

Given that you are having these kinds of problems, you might want to look at mkbundle. If you do not need to distribute your program to third parties you might want to use the --static option.




回答2:


You can try the following:

% MONO_PATH=. mono yourapp.exe

It will make mono look in the current directory to find its files. But if your environment is not set correctly you'll likely have other issues (e.g. finding the GAC, machine.config...). Look at the mono-project.com wiki for more information.



来源:https://stackoverflow.com/questions/7855684/mono-return-error-mono-mscorlib-dll-was-not-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!