2011-12-06 75 views
1

我想用ASP.NET MVC Mono开发一个应用程序。
安装最新版本的Mono和Monodevelop。尝试运行默认的“欢迎使用ASP.NET MVC!”应用程序,我得到以下错误:ASP.NET MVC与单声道

Server Error in '/' Application.

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Could not load file or assembly 'System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

Source Error:

Line 34: Line 35: Line 36: Line 37: Line 38:

Source File: C:\Users\Sergey\Desktop\mvc\mvc\web.config Line: 36

Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.

WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927


试图把System.Web.Mvc.dll程序从C:\ Program Files文件\单-2.10.6 \ LIB \单声道\ 2.0 BIN \ - 应用程序仍然没有按“T跑,我只是得到,而不是

The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

The system cannot find the file specified.

我该怎么办?

P.S.我的操作系统是Windows 7.

+1

尝试在复制后使用单声道(不是.NET)运行它。 MonoDevelop默认运行.net。 –

+0

它的工作!非常感谢!请张贴这个答案,以便我可以将其标记为已接受。 – Sergey

回答

2

正如评论建议,我发布这个答案;)当试图运行引用Mono的程序集的应用程序,可以尝试与Mono运行它(而不是.NET的MonoDevelop什么作为默认值),因为它使用不同的GAC。

+0

你能解释一下如何使用Mono而不是.NET来运行ASP.NET应用程序吗?有没有办法在MonoDevelop中将Mono设置为默认值? – marisks

+0

@MarisKs:是的,如果您在Windows上安装了Mono,则应在主窗口顶部有一个列表框,让您选择项目的当前运行时间(Mono或.NET)。还可能有一个首选项设置哪个运行时用于新项目,我不确定(以及使用Linux;))。 –