我目前在我的ASP.NET MVC項目中工作another issue。爲了更好地理解代碼庫中發生的事情,我決定在我自己的項目中引用ASP.NET MVC源代碼項目,方法是將解決方案文件添加到我的引用中。如何解決我的項目DLL和GAC中的DLL之間的歧義?
當我這樣做,我開始得到HTTP 404錯誤。
恰好如此,我在HandleErrorAttribute
的OnException()
方法上設置了斷點,否則可能需要很長時間才能找到實際問題。當我懸停在OnException
方法調用的參數filterContext
,我得到這個Exception
描述:
The type 'System.Web.Mvc.ViewMasterPage' is ambiguous: it could come from assembly [path to assembly in GAC] or from assembly [path to assembly in my project]
在GAC大會是那裏,因爲我安裝了ASP.NET MVC 2.0 RC2 release。
如何最好地解決這種歧義?
System.Web.Mvc在AssemblyBinding中未被引用,但*在編譯/彙編中被引用。我想我解決了它。感謝您的幫助。 +1 – 2010-02-24 22:07:23