0

Hardware & OS: Raspberry pi (Model B) & Soft-float Debian “wheezy”

Ok first thing I did was do a 'mono-complete' the install went smoothly. I ran some test and it worked great. the mono version was 2.10.8.x. I ran a simple ASP.net (NOT MVC) in XSP (& mono-fastcgi-server4) and it worked too. Then I tried a more complex version with a database (system.data.sqlite) that one did not go smooth but i figured my way out of that one.

So now I tried one version with sqlite + entity framework and shockingly (to me) it did not work. I tried so many different things. I couldn't figure it out. So I started looking on the web what could be possibly be wrong I realised that entity framework was added to mono in the latest (BETA, 3.0.1) version. this was version 3.0.1 So I downloaded this version and installed. it took forever and ever to install.

pi@raspberrypi ~ $ mono -V
Mono JIT compiler version 3.0.1 (tarball Sat Dec  1 01:10:37 AST 2012)
Copyright (C) 2002-2012 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
        TLS:           __thread
        SIGSEGV:       normal
        Notifications: epoll
        Architecture:  armel,vfp
        Disabled:      none
        Misc:          softdebug
        LLVM:          supported, not enabled.
        GC:            Included Boehm (with typed GC and Parallel Mark)

But it installed. I did some test(in csharp interactive compiler) and it seemed to be OK. While it was building/compiling/installing I did see plenty of warnings. I don't know if this is normal. Else i would expect an error and it has to immediately stop.

Ok Here is my problem now: I tried to run a simple website and see this in the browser:

Compilation Error

Description: Error compiling a resource required to service this request. Review your source file and modify it to fix this error.

Compiler Error Message: CS1703: An assembly with the same identity `mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' has already been imported. Consider removing one of the references


Show Detailed Compiler Output:

dmcs /target:library /lib:"/var/www/dotnet/Adwen/Bin" /debug+ /optimize- /warn:4 /out:"/tmp/root-temp-aspnet-0/624d0ef6/App_Code.1da3d18.dll" /r:"/var/www/dotnet/Adwen/Bin/myTest.dll" /r:"/var/www/dotnet/Adwen/Bin/Adwen.dll" /r:"/var/www/dotnet/Adwen/Bin/myTestModel.dll" /r:"/var/www/dotnet/Adwen/Bin/System.Data.Entity.dll" /r:"/var/www/dotnet/Adwen/Bin/System.Data.SQLite.Linq.dll" /r:"/var/www/dotnet/Adwen/Bin/System.Data.SQLite.dll" /r:"/var/www/dotnet/Adwen/Bin/System.Web.Entity.dll" /r:"/var/www/dotnet/Adwen/Bin/TechInfoSystems.Data.SQLiteProvider.dll" /r:"/usr/lib/mono/4.0/mscorlib.dll" /r:"/usr/lib/mono/gac/Microsoft.CSharp/4.0.0.0__b03f5f7f11d50a3a/Microsoft.CSharp.dll" /r:"/usr/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll" /r:"/usr/lib/mono/gac/System.Configuration/4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll" /r:"/usr/lib/mono/gac/System.Web/4.0.0.0__b03f5f7f11d50a3a/System.Web.dll" /r:"/usr/lib/mono/gac/System.Data/4.0.0.0__b77a5c561934e089/System.Data.dll" /r:"/usr/lib/mono/gac/System.Web.Services/4.0.0.0__b03f5f7f11d50a3a/System.Web.Services.dll" /r:"/usr/lib/mono/gac/System.Xml/4.0.0.0__b77a5c561934e089/System.Xml.dll" /r:"/usr/lib/mono/gac/System.Drawing/4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll" /r:"/usr/lib/mono/gac/System.EnterpriseServices/4.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll" /r:"/usr/lib/mono/gac/System.IdentityModel/4.0.0.0__b77a5c561934e089/System.IdentityModel.dll" /r:"/usr/lib/mono/gac/System.Runtime.Serialization/4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll" /r:"/usr/lib/mono/gac/System.Xaml/4.0.0.0__b77a5c561934e089/System.Xaml.dll" /r:"/usr/lib/mono/gac/System.ServiceModel/4.0.0.0__b77a5c561934e089/System.ServiceModel.dll" /r:"/usr/lib/mono/gac/System.ServiceModel.Web/4.0.0.0__31bf3856ad364e35/System.ServiceModel.Web.dll" /r:"/usr/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll" /r:"/usr/lib/mono/gac/System.Web.Extensions/4.0.0.0__31bf3856ad364e35/System.Web.Extensions.dll" /r:"/usr/lib/mono/gac/System.Data.DataSetExtensions/4.0.0.0__b77a5c561934e089/System.Data.DataSetExtensions.dll" /r:"/usr/lib/mono/gac/System.Xml.Linq/4.0.0.0__b77a5c561934e089/System.Xml.Linq.dll" /r:"/usr/lib/mono/gac/System.ComponentModel.DataAnnotations/4.0.0.0__31bf3856ad364e35/System.ComponentModel.DataAnnotations.dll" /r:"/usr/lib/mono/gac/System.Web.DynamicData/4.0.0.0__31bf3856ad364e35/System.Web.DynamicData.dll" /r:"/usr/lib/mono/gac/System.Data.Linq/4.0.0.0__b77a5c561934e089/System.Data.Linq.dll" /r:"/usr/lib/mono/gac/System.Web.ApplicationServices/4.0.0.0__31bf3856ad364e35/System.Web.ApplicationServices.dll" /r:"/var/www/dotnet/Adwen/bin/System.Data.SQLite.dll" /r:"/var/www/dotnet/Adwen/bin/System.Data.Entity.dll" /r:"/tmp/root-temp-aspnet-0/32404ce1/assembly/shadow/3f3d66bb/989bd275_a7a6b4ce_00000002/myTest.dll" /r:"/tmp/root-temp-aspnet-0/32404ce1/assembly/shadow/5cf434e0/fb52802e_a7a6b4ce_00000002/Adwen.dll" /r:"/tmp/root-temp-aspnet-0/32404ce1/assembly/shadow/ca2786da/6d813214_a7a6b4ce_00000002/myTestModel.dll" /r:"/tmp/root-temp-aspnet-0/32404ce1/assembly/shadow/cee499b3/69422d7d_a7a6b4ce_00000002/System.Data.SQLite.Linq.dll" /r:"/tmp/root-temp-aspnet-0/32404ce1/assembly/shadow/b7cd78f2/106bcc3c_a7a6b4ce_00000002/System.Web.Entity.dll" /r:"/tmp/root-temp-aspnet-0/32404ce1/assembly/shadow/5f634169/f8c5f5a7_a7a6b4ce_00000002/TechInfoSystems.Data.SQLiteProvider.dll" /d:DEBUG  -- "/tmp/root-temp-aspnet-0/624d0ef6/App_Web_285c26e8_0.cs" "/tmp/root-temp-aspnet-0/624d0ef6/App_Web_285c26e8_1.cs" "/tmp/root-temp-aspnet-0/624d0ef6/App_Web_285c26e8_2.cs" "/tmp/root-temp-aspnet-0/624d0ef6/App_Web_285c26e8_3.cs" "/tmp/root-temp-aspnet-0/624d0ef6/App_Web_285c26e8_4.cs" 

error CS1703: An assembly with the same identity `mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' has already been imported. Consider removing one of the references
mscorlib.dll (Location of the symbol related to previous error)
/usr/lib/mono/4.0/mscorlib.dll (Location of the symbol related to previous error)
error CS1703: An assembly with the same identity `System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' has already been imported. Consider removing one of the references
/usr/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll (Location of the symbol related to previous error)
System.dll (Location of the symbol related to previous error)
error CS1703: An assembly with the same identity `System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' has already been imported. Consider removing one of the references
/usr/lib/mono/gac/System.Xml/4.0.0.0__b77a5c561934e089/System.Xml.dll (Location of the symbol related to previous error)
System.Xml.dll (Location of the symbol related to previous error)
error CS1703: An assembly with the same identity `System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' has already been imported. Consider removing one of the references
/usr/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll (Location of the symbol related to previous error)
System.Core.dll (Location of the symbol related to previous error)
error CS1703: An assembly with the same identity `Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' has already been imported. Consider removing one of the references
/usr/lib/mono/gac/Microsoft.CSharp/4.0.0.0__b03f5f7f11d50a3a/Microsoft.CSharp.dll (Location of the symbol related to previous error)
Microsoft.CSharp.dll (Location of the symbol related to previous error)

Version information: Mono Runtime Version: 2.10.8.1 (Debian 2.10.8.1-5); ASP.NET Version: 4.0.30319.1

if you noticed at the bottom the error you can clearly see 'Version information: Mono Runtime Version: 2.10.8.1 (Debian 2.10.8.1-5); ASP.NET Version: 4.0.30319.1' I was expecting to see another runtime version.

So where do I proceed from here? Is this a bug? Did the install go wrong? another xsp version? Should I install again? can I fix this? It could be anything so let me ask before i waste a lot of time and effort into it.

CodesInChaos
  • 106,488
  • 23
  • 218
  • 262
Adwen
  • 111
  • 3
  • 11

2 Answers2

1

I wrote this post and found out the problem immediately after. It was indeed something wrong with XSP4 (or mono-fastcgi-server4). I installed mono 3.0.1 under the assumption that it would install the latest xsp. But that was not the case. So I downloaded the latest version from github. And my basic website was working again. But my website with entity framework is still not working didn't get the time to work that out yet. I was going to do that before I would report my findings here.

Adwen
  • 111
  • 3
  • 11
  • If you manage to get EF + Mono working, please let me (us) know - I wasn't able to get in run :/ – Dresel Dec 08 '12 at 13:24
  • In one word: NO. EF is still a big mystery. I tried a couple of things today but to no avail. I think it has something to with framework version. (I'm using 4 but I should target 4.5) So It can go in any direction what could be missing. – Adwen Dec 10 '12 at 02:56
  • Yeah it's impossible to find any information about that - what i know is that the provider has to support EF6 (it need to be rebuilded), i tried EF with Mono 3.0.2 with the Microsoft SQL Provider (EntityFramework.SQLServer), which are both part of the Mono Release, but i get runtime exceptions when using it (http://stackoverflow.com/questions/13624065/how-to-setup-entity-framework-sql-server-with-mono) :/ – Dresel Dec 10 '12 at 08:29
0

I have never used FastCGI Server before, but I've seen the same problem with mod-mono-server4 a couple of weeks ago - but it was fixed shortly after I reported it, so your Mono 3.0.1 should be fine.

However, it looks like FastCGI Server is not using the new Mono 3.0.1 that you compiled and installed, but an older one.

Did you install that new Mono into some custom prefix in your home directory? Look at your web server configuration to check which mono-fastcgi-server4 it's using, then look at that file - it should be some shell script with the full path of mono in it (which probably is /usr/bin/mono).

Martin Baulig
  • 3,010
  • 1
  • 17
  • 22