如何使用ASP.NET MVC从源代码而不是GAC建? [英] How can you use ASP.NET MVC build from source rather than the GAC?

查看:105
本文介绍了如何使用ASP.NET MVC从源代码而不是GAC建?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在本地安装ASP.NET MVC的,但我希望能够使用code是在$ SVN仓库C $ CPLEX而不是发布1.0版本。但是,如果我删除参考GAC装配在我的解决方案,并添加参照当地建造 System.Web.Mvc ,将打造精品,但在运行时它说


  

分析器错误信息:类型'System.Web.Mvc.ViewPage'不明确:它可能来自程序集W:\\源\\项目\\ vinemedia \\ VineMedia.Site \\ BIN \\ System.Web.Mvc.dll程序或者从程序集C:\\ WINDOWS \\装配\\ GAC_MSIL \\ System.Web.Mvc \\ 1.0.0.0__31bf3856ad364e35 \\ System.Web.Mvc.dll程序。请在类型名称中显式指定程序集。



解决方案

有很多都web.config中修改和〜/查看/需要与ASP.NET MVC一起进行的web.config配置文件资源。你应该阅读这一点 - <一个href=\"http://blog.$c$cville.net/2009/02/03/using-the-aspnet-mvc-source-$c$c-to-debug-your-app/\">Steve桑德森的博客 - 使用ASP.NET MVC源$ C ​​$ C调试你的应用

I've installed the ASP.NET MVC locally, but I want to be able to use the code that is in the SVN repository on CodePlex rather than the released 1.0 version. However if I remove the reference to the GAC assembly in my solution and add the reference to the locally built System.Web.Mvc, it will build fine, but at runtime it says:

Parser Error Message: The type 'System.Web.Mvc.ViewPage' is ambiguous: it could come from assembly 'W:\source\projects\vinemedia\VineMedia.Site\bin\System.Web.Mvc.DLL' or from assembly 'C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mvc\1.0.0.0__31bf3856ad364e35\System.Web.Mvc.dll'. Please specify the assembly explicitly in the type name.

解决方案

There are a lot of modifications in both web.config and ~/Views/web.config configuration files that need to be made for working with ASP.NET MVC source. You should read this - Steve Sanderson’s blog - Using the ASP.NET MVC source code to debug your app

这篇关于如何使用ASP.NET MVC从源代码而不是GAC建?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆