0

硬件和操作系统:Raspberry pi (Model B) 和 Soft-float Debian “wheezy”</p>

好的,我做的第一件事就是做一个“单完成”,安装很顺利。我进行了一些测试,效果很好。单声道版本是 2.10.8.x。我在 XSP(和 mono-fastcgi-server4)中运行了一个简单的 ASP.net(不是 MVC),它也可以工作。然后我尝试了一个更复杂的版本,其中包含一个数据库(system.data.sqlite),它并不顺利,但我想出了办法。

所以现在我尝试了一个带有 sqlite + 实体框架的版本,但令人震惊的是(对我来说)它不起作用。我尝试了很多不同的东西。我想不通。所以我开始在网上寻找可能有什么问题,我意识到实体框架是在最新(BETA,3.0.1)版本中添加到单声道的。这是版本 3.0.1 所以我下载了这个版本并安装了。它需要永远安装。

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)

但是它安装了。我做了一些测试(在 csharp 交互式编译器中),它似乎没问题。在构建/编译/安装时,我确实看到了很多警告。我不知道这是否正常。否则我会期待一个错误,它必须立即停止。

好的,现在我的问题是:我尝试运行一个简单的网站并在浏览器中看到:

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

如果您在底部注意到错误,您可以清楚地看到“版本信息:Mono 运行时版本:2.10.8.1 (Debian 2.10.8.1-5); ASP.NET 版本:4.0.30319.1'我期待看到另一个运行时版本。

那么我从哪里开始呢?这是一个错误吗?安装出错了吗?另一个xsp版本?我应该重新安装吗?我可以解决这个问题吗?它可以是任何东西,所以在我浪费大量时间和精力之前让我问一下。

4

2 回答 2

1

我写了这篇文章,然后立即发现了问题。XSP4(或 mono-fastcgi-server4)确实有问题。我安装了 mono 3.0.1,假设它会安装最新的 xsp。但事实并非如此。所以我从github下载了最新版本。我的基本网站又开始工作了。但是我的带有实体框架的网站仍然无法正常工作,还没有时间解决这个问题。在我在这里报告我的发现之前,我打算这样做。

于 2012-12-04T13:10:38.120 回答
0

mod-mono-server4我以前从未使用过 FastCGI 服务器,但几周前我看到了同样的问题- 但在我报告它后不久它就得到了修复,所以你的 Mono 3.0.1 应该没问题。

但是,FastCGI Server 似乎没有使用您编译和安装的新 Mono 3.0.1,而是使用旧版本。

您是否将新的 Mono 安装到主目录中的某个自定义前缀中?查看您的 Web 服务器配置以检查mono-fastcgi-server4它正在使用哪个文件,然后查看该文件 - 它应该是一些带有完整路径的 shell 脚本mono(可能是/usr/bin/mono)。

于 2012-12-03T07:49:51.280 回答