문제

I'm new here.

I have searched this site for answers and I found a workaround, but I'd still like get the original problem solved. I have set the target framework to Mono/.NET 4.0 and I am using Mysql.Data.dll. It compiles fine, but when I am trying to run it on xsp2 web server on my laptop, I run into errors:

Missing method .ctor in assembly
/tmp/kari-temp-aspnet-0/eaee30a1/assembly/shadow/04e2c4cc/18848ad4_1c664e18_00000001/MySql.Data.dll, type System.Security.SecurityRulesAttribute
Can't find custom attr constructor image:
/tmp/kari-temp-aspnet-0/eaee30a1/assembly/shadow/04e2c4cc/18848ad4_1c664e18_00000001/MySql.Data.dll mtoken: 0x0a00002a
Missing method System.Threading.Monitor::Enter(object,bool&) in assembly /usr/lib/mono/2.0/mscorlib.dll, referenced in assembly /tmp/kari-temp-aspnet-0/eaee30a1/assembly/shadow/04e2c4cc/18848ad4_1c664e18_00000001/MySql.Data.dll

Here you can see that it is using .../2.0/mscorlib.dll. I have tried to create a new project, like this thread suggests Mono take mscorlib.dll 2.0 instead of 4.0 but it still does the same. If I set the target framework to Mono/.NET 2.0, I run into some other errors.

For the workaround, I renamed mscorlib.dll in 2.0 and then made a symbolic link to the same file in 4.0 directory as some post here suggested and it works, but I'm not happy with that.

Is there a way to manually edit a project configuration file to select a 4.0 target instead of 2.0? Should this be reported as a bug to MonoDevelop? I am using MonoDevelop 2.8.6.3.

도움이 되었습니까?

해결책

This is how xsp works:

xsp2 => mscorlib.dll 2.0  
xsp4 => mscorlib.dll 4.0
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top