È possibile ottenere un progetto ASP.NET MVC 3 che lavora con Mono 2.10?
-
14-11-2019 - |
Domanda
Mono 2.10 Note di rilascio suggerimento Suggerisci Supporto per ASP.NET MVC 3.0 e Razor usando XSP .
Al momento dell'apertura di un progetto predefinito ASP.NET MVC 3.0 di nuova creato (creato con Visual Studio 2010) in MonoDevelop 2.4.2 (Mac OS X), mancano le seguenti DLL:
System.Web.Entity
System.Web.Helpers
System.Web.Mvc
System.Web.WebPages
.
Tutto ciò che sostituisco con DLL ottenute dalla mia installazione di Windows. Il progetto si basa, ma ricevo il seguente messaggio di errore quando si tenta di eseguire il debug del progetto:
Adding applications '/:.'...
Registering application:
Host: any
Port: any
Virtual path: /
Physical path: /.../Mvc3Test/
Handling exception type TargetInvocationException
Message is Exception has been thrown by the target of an invocation.
IsTerminating is set to True
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
.
Prima di effettuare queste sostituzioni, l'applicazione viene eseguita ma ovviamente con errori di riferimento mancanti. Quale suggerirebbe che qualcosa nelle nuove DLL sta avvitando il server XSP.
Cosa sto facendo male? Sono troppo semplicistico? Sono nuovo a Mono e monodevelop , ma sono in grado di creare con successo, costruire e debug mvc 2.0 Progetti con la mia attuale installazione di monodevelop.
Soluzione
I'm elated. The new version of Mono, 2.10.1, fixed the issues with ASP.NET MVC 3.0. It is running without a hitch.
Altri suggerimenti
Works fine, have a look at http://erikzaadi.com/2011/03/02/installscripttorunaspdotnetmvc3withrazoronnginxataopensuseserver/
The only trick is copying the correct assemblies...
If you need the solution, it's available at http://labs.erikzaadi.com/monoOnSuse/RazorOnMonoSolution.zip
Hope this helps.
[Note] You don't need openSuse to run the solution, just a mono 2.10 environment, works fine on mac as well.