I built the ASP.NET MVC 3 web application on Windows 7 using Visual Studio 2012. My application builds and runs without any problems in Visual Studio. I want to edit and run this web application using Xamarin Studio 4.0 with Mono 3.0.4 on OS X 10.8.2. Here is what I have tried so far:
- Opened my .sln in Xamarin Studio.
- Remote links to System.Data.Entity and System.Web.Entity.
- The copied System.Web.Helpers (version 1.0.0.0), System.Web.Mvc (version 3.0.0.0) and System.Web.WebPages (version 1.0.0.0) .dlls to the bin folder.
- Removed old links to System.Web.Helpers, System.Web.Mvc and System.Web.Webpages.
- Replace "using System.Data. *" With "using System.Data.Entity.Core. *" In my * .Designer.cs files.
- Remote link to EntityFramework (version 4.x).
- Deleted EntityFramework.dll and EntityFramework.xml from the bin folder.
- Added link to /Library/Frameworks/Mono.framework/Libraries/mono/4.5/EntityFramework.dll(version 6.0.0.0).
- Click "Run."
After I click run, I get the following exception:
Exception rethrown at [0]: ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Web.Configuration.HostingEnvironmentSection ---> System.MissingMethodException: Method not found: 'System.Configuration.ConfigurationProperty..ctor'. --- End of inner exception stack trace --- at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&) at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x000b9] in /Users/duncan/git/mono/bockbuild/profiles/mono-mac-release/build-root/mono-3.0.4/_build/mono-3.0.4.git/mcs/class/corlib/System.Reflection/MonoMethod.cs:524 --- End of inner exception stack trace --- at (wrapper xdomain-invoke) System.AppDomain:DoCallBack (System.CrossAppDomainDelegate) at (wrapper remoting-invoke-with-check) System.AppDomain:DoCallBack (System.CrossAppDomainDelegate) at System.Web.Hosting.ApplicationHost.CreateApplicationHost (System.Type hostType, System.String virtualDir, System.String physicalDir) [0x002fb] in /Users/duncan/git/mono/bockbuild/profiles/mono-mac-release/build-root/mono-3.0.4/_build/mono-3.0.4.git/mcs/class/System.Web/System.Web.Hosting/ApplicationHost.cs:244 at Mono.WebServer.VPathToHost.CreateHost (Mono.WebServer.ApplicationServer server, Mono.WebServer.WebSource webSource) [0x0003a] in /Users/builder/data/lanes/mono-mac-ui-refresh-master/3108f76b/source/bockbuild/profiles/mono-mac-release/build-root/xsp-2.11/_build/mono-xsp-d3e2f80/src/Mono.WebServer/VPathToHost.cs:150 at Mono.WebServer.XSP.Server.RealMain (System.String[] args, Boolean root, IApplicationHost ext_apphost, Boolean quiet) [0x00775] in /Users/builder/data/lanes/mono-mac-ui-refresh-master/3108f76b/source/bockbuild/profiles/mono-mac-release/build-root/xsp-2.11/_build/mono-xsp-d3e2f80/src/Mono.WebServer.XSP/main.cs:486 at Mono.WebServer.XSP.Server.Main (System.String[] args) [0x00025] in /Users/builder/data/lanes/mono-mac-ui-refresh-master/3108f76b/source/bockbuild/profiles/mono-mac-release/build-root/xsp-2.11/_build/mono-xsp-d3e2f80/src/Mono.WebServer.XSP/main.cs:264
I have an exception from Google, but I have not found a solution. Am I missing a link? Is there an example of a working project anywhere that uses MVC 3 or 4 and Entity Framework 4 or 6 that work under Mono?
source share