[Mono-dev] Porting an MVC2 project to MVC3 under mod_mono 2.10.1

Frank Cohen frankenspank at gmail.com
Thu Oct 11 22:18:34 UTC 2012


Well, it just occurred to me that I never updated the machine.config for
.NET 4.0.  I added this MySQL Data provider to the  mono/4.0/machine.config
and this seems to have solved the problem.

           <add name="MySQL Data Provider"
invariant="MySql.Data.MySqlClient" description=".Net Framework Data
Provider for MySQL"
                 type="MySql.Data.MySqlClient.MySqlClientFactory,
MySql.Data, Version=6.3.5.0, Culture=neutral,
PublicKeyToken=c5687fc88969c44d"/>


On Thu, Oct 11, 2012 at 5:58 PM, Frank Cohen <frankenspank at gmail.com> wrote:

> I am trying to port an existing MVC2 application to MVC3.  It ran fine
> under MVC2, but I can't get the app to run under MVC3.  I did get a bare
> bones MVC3 app to run without issue.  I've provided some information about
> the problem below. Does have an idea what the problem might be or at the
> very least, how to glean more information about the error?
>
>
> I am getting the following error:
>
> Unhandled Exception: System.IO.FileLoadException: The assembly name is invalid.
>   at System.Reflection.AssemblyName..ctor (System.String assemblyName) [0x00045] in /root/mono-2.10.1/mcs/class/corlib/System.Reflection/AssemblyName.cs:93
>   at Mono.CSharp.ImportedAssemblyDefinition.ReadAttributes () [0x000c5] in /root/mono-2.10.1/mcs/mcs/import.cs:1522
>   at Mono.CSharp.MetadataImporter.GetAssemblyDefinition (System.Reflection.Assembly assembly) [0x00028] in /root/mono-2.10.1/mcs/mcs/import.cs:821
>   at Mono.CSharp.ReflectionImporter.ImportAssembly (System.Reflection.Assembly assembly, Mono.CSharp.RootNamespace targetNamespace) [0x00000] in /root/mono-2.10.1/mcs/mcs/reflection.cs:88
>   at Mono.CSharp.DynamicLoader.LoadReferences (Mono.CSharp.ModuleContainer module) [0x0003e] in /root/mono-2.10.1/mcs/mcs/reflection.cs:587
>   at Mono.CSharp.Driver.Compile () [0x00159] in /root/mono-2.10.1/mcs/mcs/driver.cs:1535
>   at Mono.CSharp.Driver.Main (System.String[] args) [0x0003d] in /root/mono-2.10.1/mcs/mcs/driver.cs:243
>
>
>
> Everything is the same as my MVC2 configuration, with the exception that I
> have removed the MVC2 related DLLs and replaced with the MVC3 DLLs from my
> project. Here is a complete list of everything that is in my bin folder,
> save for the application DLLs:
>
> Compiled for .NET v2.0.50727:
>
> AutoMapper.dll 1.1.0.188
> Castle.Core.dll 2.5.0.0
> DotNetOpenAuth.dll 3.2.3.12162
> log4net.dll 1.2.10.0
> Microsoft.Contracts.dll 1.0.0.0
> mysql.data.dll 6.4.3.0
> mysql.data.entity.dll 6.4.3.0
> mysql.web.dll 6.4.3.0
> SubSonic.Core.dll 3.0.0.3
> SubSonic.Web.dll 3.5.0.0
>
> Compiled for .NET 3 and 4
>
> System.Web.Abstractions.dll
> System.Web.Helpers.dll
> System.Web.Mvc.dll
> System.Web.WebPages.Deployment.dll
> System.Web.WebPages.dll
> System.Web.WebPages.Razor.dll
>
> I read something about the mysql provider having to be Pascal Cased, and I
> tried this, but it didn't solve the problem.
>
> -Frank
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20121011/f134f5f6/attachment.html>


More information about the Mono-devel-list mailing list