Mono take mscorlib.dll 2.0 instead of 4.0

I have a problem with the MONO application, I'm trying to compile a project (with MonoDevelop) to load the mscorlib.dll 4.0 library instead of version 2.0. (I need the System.Type.op_Equality method, which is in version 4.0 but not in version 2.0).

I temporarily decided by setting the 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 an invalid solution.

Does anyone know how MONO to load mscorlib 4.0 instead of 2.0?

Thanks and sorry for my english

+3
linux mono monodevelop mscorlib
source share
2 answers

Finally, I found a solution to this problem:

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

Just change the file "app.config" and change the contents for this:

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

Recompile the project and now work fine.

+3
source share

Right-click the project -> open the Build / General page and make sure Target Framework Mono / .NET 4.0 :

enter image description here

+1
source share

All Articles