未处理的异常在VS扩展中。

3

我尝试为自定义文件定义创建一个语法高亮器,但在加载时出现了异常。我已经在devenv中添加了/log参数以获取日志。


335 ERROR System.Exception: Duplicate EditorFormatDefinition exports with identical NameAttribute metadata exist. Duplicate name attribute is COMMENT   Editor or Editor Extension 2010/08/18 06:47:56.726 
336 ERROR System.Exception: Duplicate EditorFormatDefinition exports with identical NameAttribute metadata exist. Duplicate name attribute is STRING   Editor or Editor Extension 2010/08/18 06:47:56.730 
337 ERROR System.Exception: Duplicate EditorFormatDefinition exports with identical NameAttribute metadata exist. Duplicate name attribute is COMMENT   Editor or Editor Extension 2010/08/18 06:47:57.046 
338 ERROR System.Exception: Duplicate EditorFormatDefinition exports with identical NameAttribute metadata exist. Duplicate name attribute is STRING   Editor or Editor Extension 2010/08/18 06:47:57.048 
339 ERROR System.Exception: Duplicate EditorFormatDefinition exports with identical NameAttribute metadata exist. Duplicate name attribute is COMMENT   Editor or Editor Extension 2010/08/18 06:47:57.078 
340 ERROR System.Exception: Duplicate EditorFormatDefinition exports with identical NameAttribute metadata exist. Duplicate name attribute is STRING 

我在代码中找不到任何重复项。如果需要,可以提供代码。

祝好, 迈克尔

1个回答

6

您可能已经安装了多个基于相同模板/命名空间/GUID的插件。


在“工具”->“扩展管理器...”下,只有一个已安装的扩展实例。我还可以补充说,在调试扩展时,我会遇到一些异常,但没有任何与插件或日志中的错误相关的异常。 - Michael
你差不多说对了。我有一些分类类型与 VS 中已有的相同。我将它们重命名,但错误仍然存在。重新构建解决了问题。 - Michael
谢谢。我在Visual Studio 2010中安装了两个冲突的扩展程序。一个是David Egli的多语言拼写检查器v2.28,另一个是EWSoftware的Visual Studio拼写检查器v2014.6.14.0。禁用多语言拼写检查器扩展并重新启动Visual Studio已经解决了问题。 - Altair
在我的情况下,问题描述在这里 - https://carstent.com/2017/06/22/visual-studio-2017-extension-load-error/ - PowerShell Tools 重复。 - vlad2135

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接