简体   繁体   English

单声道取mscorlib.dll 2.0而不是4.0

[英]Mono take mscorlib.dll 2.0 instead of 4.0

I am having a problem with an MONO application, I'm trying to compile the project (with MonoDevelop) so as to load the library run mscorlib.dll 4.0 instead of version 2.0. 我有一个MONO应用程序的问题,我正在尝试编译项目(使用MonoDevelop),以便加载库运行mscorlib.dll 4.0而不是2.0版。 (I need System.Type.op_Equality method that is in version 4.0 but not in 2.0). (我需要在4.0版本但不在2.0版本中的System.Type.op_Equality方法)。

I've temporarily solved by making a link: 我通过建立链接暂时解决了:

# cd /usr/lib/mono/2.0
# mv mscorlib.dll mscorlib.dll.bak
# ln ../4.0/mscorlib.dll mscorlib.dll

But of course this is not a valid solution. 但当然这不是一个有效的解决方案。

Does anyone know how to MONO load mscorlib 4.0 instead of 2.0? 有谁知道如何MONO加载mscorlib 4.0而不是2.0?

Thanks and sorry for my English 谢谢,抱歉我的英语

Finaly I found a solution for this problem: 最后我找到了解决这个问题的方法:

https://bugs.launchpad.net/ubuntu/+source/gtk-sharp2/+bug/884035/comments/14 https://bugs.launchpad.net/ubuntu/+source/gtk-sharp2/+bug/884035/comments/14

Simply modify the "app.config" file and change the content for this: 只需修改“app.config”文件并更改内容:

<?xml version="1.0"?>
<configuration>
<startup><supportedRuntime version="v4.0"/></startup></configuration>

Recompile the proyect and now work fine. 重新编译proyect,现在工作正常。

Right-click the project -> open the Build/General page and make sure Target Framework is Mono / .NET 4.0 : 右键单击项目 - >打开Build / General页面并确保Target Framework是Mono / .NET 4.0

在此输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM