VSeWSS“已添加具有相同密钥的项目”

发布于 2024-08-09 12:12:31 字数 682 浏览 4 评论 0原文

在 VSeWSS 部署的打包阶段,会引发异常。从日志中:

2009/11/02 11:59:46 错误 System.ArgumentException:带有以下内容的项目 已添加相同的密钥。
在 System.ThrowHelper.ThrowArgumentException(ExceptionResource 资源)位于 System.Collections.Generic.Dictionary2.Insert(TKey 键、TValue 值、布尔相加)at System.Collections.Generic.Dictionary2.Add(TKey 键,TValue 值)位于 Microsoft.SharePoint.Tools.SharePointProxies.WSPViewFacade.CreateWebPartReferenceResolverClassMap(String[] 路径)在 VSeWSS.Server.Services.SPService.CreateWebPartReferenceResolverClassMap(字符串[] 路径)

以前有人见过这个吗?我已经检查了所有 feature.xml 文件和 Solution.xml 以查看是否有任何 id 重复,但事实并非如此。我还检查了功能名称,它们也没有重复。有什么提示吗?

During the package phase of a VSeWSS deployment, an exception is thrown. From the logs:

2009/11/02 11:59:46 Error
System.ArgumentException: An item with
the same key has already been added.
at
System.ThrowHelper.ThrowArgumentException(ExceptionResource
resource) at
System.Collections.Generic.Dictionary2.Insert(TKey
key, TValue value, Boolean add) at
System.Collections.Generic.Dictionary
2.Add(TKey
key, TValue value) at
Microsoft.SharePoint.Tools.SharePointProxies.WSPViewFacade.CreateWebPartReferenceResolverClassMap(String[]
paths) at
VSeWSS.Server.Services.SPService.CreateWebPartReferenceResolverClassMap(String[]
paths)

Has anyone seen this before? I have checked all my feature.xml files and my solution.xml to see if any id's have been duplicated, and they aren't. I've also checked the names of features, and they also have not been duplicated. Any hints?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

初与友歌 2024-08-16 12:12:31

这可能是 vsewss 中的一个错误。问题是它记得上次添加相同的项目。

尝试:

  • 清理解决方案
  • 关闭并重新打开 Visual Studio

编辑:还有一些需要尝试的操作

  • 从 Sharepoint 手动删除已部署的代码
  • 您是否拥有最新版本的 vsewss 工具?
  • Webpart 项目之间有参考吗?
  • pkg 目录中的任何文件是否为只读

It is probably a bug in vsewss. The problem is that it remembers that last time it added the same item.

Try:

  • Clean solution
  • Close and reopen Visual Studio

Edit: a few more things to try

  • Remove deployed code manually from Sharepoint
  • Do you have the latest version of the vsewss tool?
  • Do you have references between webpart projects?
  • Are any of the files in the pkg directory readonly
傲鸠 2024-08-16 12:12:31

我也有这个问题。

归结为这样一个事实:我在本地附加了另一个 DLL,然后我正在引用它。这已经在之前的项目中部署过。

当我从解决方案中排除 DLL 时,Web 部件已部署

I too had this problem.

It came down to the fact that I had locally attached another DLL, that I was then referencing. This had already been deployed in a previous project.

When I excluded the DLL from the solution, the webpart deployed

尛丟丟 2024-08-16 12:12:31

检查您的manifest.xml 文件中是否有每个失败的项目 - 删除重复的程序集引用以解决此问题。

Check your manifest.xml file for each project that's failing - remove duplicate assembly references to resolve this issue.

风启觞 2024-08-16 12:12:31

您能否尝试在 VSeWSS dll 中使用 .NEt Reflector 并检查由 Microsoft.SharePoint.Tools.SharePointProxies.WSPViewFacade 类中的 CreateWebPartReferenceResolverClassMap 方法开始执行的实际代码?这可能会为您提供有关在自己的解决方案中查找位置的更深入的信息。

Could you try .NEt Reflector in the VSeWSS dll's and check the actual code that's beging executed by the CreateWebPartReferenceResolverClassMap method in the Microsoft.SharePoint.Tools.SharePointProxies.WSPViewFacade class? This might provide you with more indepth info on where to look in your own solution.

几味少女 2024-08-16 12:12:31

我终于完全重建了这个项目,一切又恢复正常了。我通常会向 MS Connect 提交类似的内容,但他们无法解决这个问题。 VSeWSS 作为 VS2008 插件是一个完全死了的产品。

我们必须努力奋斗,直到获得 VS2010,此时我可以开始提交连接错误。

I finally ended up completely reconstituting the project, and all is well again. I would normally submit something like this to MS Connect, but there's no way they're going to fix this. VSeWSS as a VS2008 plugin is a completely dead product.

We'll just have to struggle along until we get VS2010, at which point I can start filing connect bugs.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文