[英]Visual Studio Error: An item with the same key has already been added
[英]VSeWSS “An item with the same key has already been added”
在VSeWSS部署的打包階段,將引發異常。 從日志中:
2009/11/02 11:59:46錯誤System.ArgumentException:已添加具有相同鍵的項。
在System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add) at System.Collections.Generic.Dictionary
處System.ThrowHelper.ThrowArgumentException(ExceptionResource資源)在System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add) at System.Collections.Generic.Dictionary
)在System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add) at System.Collections.Generic.Dictionary
(TKey鍵,TValue值)在VSeWSS.Server.Services.SPService.CreateWebPartReferenceResolverClassMap(String []路徑)上的Microsoft.SharePoint.Tools.SharePointProxies.WSPViewFacade.CreateWebPartReferenceResolverClassMap(String []路徑)
誰看過這個嗎? 我已經檢查了我所有的feature.xml文件和solution.xml,以查看是否有任何ID重復,而沒有。 我還檢查了功能的名稱,它們也沒有重復。 有什么提示嗎?
這可能是vsewss中的錯誤。 問題在於它還記得上次添加相同項目的情況。
嘗試:
編輯:更多嘗試的事情
我也有這個問題。
歸結為我在本地附加了另一個DLL,然后再進行引用。 這已經在先前的項目中進行了部署。
當我從解決方案中排除DLL時,Webpart已部署
檢查失敗的每個項目的manifest.xml文件-刪除重復的程序集引用以解決此問題。
您可以在VSeWSS dll中嘗試.NEt Reflector,並檢查Microsoft.SharePoint.Tools.SharePointProxies.WSPViewFacade類中由CreateWebPartReferenceResolverClassMap方法執行的beging的實際代碼嗎? 這可能會為您提供有關在自己的解決方案中的何處查找的更深入的信息。
我最終最終完全重組了該項目,一切都恢復了。 我通常會向MS Connect提交這樣的內容,但是他們無法解決此問題。 VSeWSS作為VS2008插件是完全無效的產品。
我們只需要努力奮斗,直到獲得VS2010,這時我就可以開始提交連接錯誤了。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.