我已经安装了ASP.NET MVC 2 RC,打开默认的 “示例项目”,但出现以下错误:ASP.NET MVC 2 System.Web.Mvc.dll程序冲突
Parser Error Message: The type 'System.Web.Mvc.ViewMasterPage' is ambiguous: it could come from assembly 'C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mvc\2.0.0.0__31bf3856ad364e35\System.Web.Mvc.dll' or from assembly 'C:\Documents and Settings\sfent\My Documents\Visual Studio 2008\Projects\MvcApplication1\MvcApplication1\bin\System.Web.Mvc.DLL'. Please specify the assembly explicitly in the type name.
这似乎是GAC dll和创建并放置在bin目录(我认为应该优先使用GAC版本)的dll之间的冲突
我已使用Google搜索此问题并发现了类似问题,但与不正确的命名空间有关。这是与MVC框架捆绑在一起的未更改的示例应用程序。
我也尝试完全删除框架并重新安装RC,但无济于事。
所有建议表示赞赏。
当您构建项目时,dll会自动在bin目录中创建。我只参考v2并且只有v2在机器上。 – Fenton 2010-01-18 10:07:46
@索尼:您可以将引用程序集设置为不复制到bin文件夹(右键单击引用并选择属性)。 – Richard 2010-01-18 10:31:49
我认为这个想法是你想在bin文件夹中的本地dll部署到“MVC未安装”托管?我错过了什么。 – Fenton 2010-01-18 10:46:44