中存在的類型'System.Web.Routing.RouteValueDictionary'如何在兩個Assemblyes中使兩個名稱空間變得不同? 或者唯一的解決方案是添加別名到名稱空間?如何解決
這是一個完整的錯誤
The type 'System.Web.Routing.RouteValueDictionary' exists in both
'c:\Windows\assembly\GAC_MSIL\System.Web.Routing\3.5.0.0__31bf3856ad364e35\System.Web.Routing.dll'
and 'c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Web.dll'
我曾試圖移動舊項目之一,從Visual Studio 2008(它在這裏工作)至2010年VS我使用.NET 3.5
我可以參考舊版本的System.Web.Routing,但我很困惑,爲什麼它在VS 2008而不是在VS 2010中工作
在這兩個項目(相同的項目,但不同版本的VS)
引用System.Web.Routing引用同一個dll(具有相同路徑)`C:\ Program Files(x86)\ Reference Assemblies \ Microsoft \ Framework \ v3.5 \ System.Web.Routing.dll'
而且參考的System.Web C:\ WINDOWS \ Microsoft.NET \框架\ V2.0.50727 \ System.Web.dll中
我曾試圖把它像System.Web.Routing.RouteValueDictionary但錯誤保持不變。
所以文件說thaht爲
- Visual Studio 2008它在命名空間:System.Web.Routing 大會:System.Web.Routing(在System.Web.Routing.dll)
- Visual Studio 2010這是在命名空間:System.Web.Routing 集:System.Web(在System.Web.dll中)
如果我刪除了System.Web.Routing參考比我不能在命名空間中使用類。
Thans爲我分享我有問題的鏈接。 – 1392023093user