gpt4 book ai didi

asp.net - 对于这个 VS 2013 异常,我可以/应该做些什么吗?

转载 作者:行者123 更新时间:2023-12-04 11:25:27 26 4
gpt4 key购买 nike

在加载我的 ASP.NET 应用程序/站点时,我收到此错误消息:“遇到异常。这可能是由扩展引起的。”

然后它说要查看这个文件:

C:\Users\Clay\AppData\Roaming\Microsoft\VisualStudio\11.0\ActivityLog.xml

...其中我确实找到了三个可能与问题有关的条目,但它们是“希腊语”。由于它们的体积,我只在这里包括第一个:

  <entry>
<record>676</record>
<time>2013/10/22 13:52:50.109</time>
<type>Error</type>
<source>Editor or Editor Extension</source>
<description>System.ComponentModel.Composition.CompositionException: The composition produced a single composition error, with 2 root causes. The root causes are provided below. Review the CompositionException.Errors property for more detailed information.&#x000D;&#x000A;&#x000D;&#x000A;1) The export &apos;Microsoft.VisualStudio.Shell.SVsServiceProvider&apos; is not assignable to type &apos;System.Void&apos;.&#x000D;&#x000A;&#x000D;&#x000A;Resulting in: Cannot set import &apos;Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager.VsServiceProvider (ContractName=&quot;Microsoft.VisualStudio.Shell.SVsServiceProvider&quot;)&apos; on part &apos;Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager&apos;.&#x000D;&#x000A;Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager.VsServiceProvider (ContractName=&quot;Microsoft.VisualStudio.Shell.SVsServiceProvider&quot;) --&gt; Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager&#x000D;&#x000A;&#x000D;&#x000A;Resulting in: Cannot get export &apos;Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager (ContractName=&quot;Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IRegistryManager&quot;)&apos; from part &apos;Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager&apos;.&#x000D;&#x000A;Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager (ContractName=&quot;Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IRegistryManager&quot;) --&gt; Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager&#x000D;&#x000A;&#x000D;&#x000A;Resulting in: Cannot set import &apos;Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider.RegistryManager (ContractName=&quot;Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IRegistryManager&quot;)&apos; on part &apos;Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider&apos;.&#x000D;&#x000A;Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider.RegistryManager (ContractName=&quot;Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IRegistryManager&quot;) --&gt; Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider&#x000D;&#x000A;&#x000D;&#x000A;Resulting in: Cannot get export &apos;Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider (ContractName=&quot;Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IBufferFeatureManagerProvider&quot;)&apos; from part &apos;Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider&apos;.&#x000D;&#x000A;Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider (ContractName=&quot;Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IBufferFeatureManagerProvider&quot;) --&gt; Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider&#x000D;&#x000A;&#x000D;&#x000A;Resulting in: Cannot set import &apos;Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider.BufferFeatureManagerProvider (ContractName=&quot;Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IBufferFeatureManagerProvider&quot;)&apos; on part &apos;Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider&apos;.&#x000D;&#x000A;Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider.BufferFeatureManagerProvider (ContractName=&quot;Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IBufferFeatureManagerProvider&quot;) --&gt; Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider&#x000D;&#x000A;&#x000D;&#x000A;Resulting in: Cannot get export &apos;Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider (ContractName=&quot;Microsoft.VisualStudio.Text.Tagging.IViewTaggerProvider&quot;)&apos; from part &apos;Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider&apos;.&#x000D;&#x000A;Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider (ContractName=&quot;Microsoft.VisualStudio.Text.Tagging.IViewTaggerProvider&quot;) --&gt; Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider&#x000D;&#x000A;&#x000D;&#x000A;2) The export &apos;Microsoft.VisualStudio.Web.Extensions.HTML.TagNameProvider (ContractName=&quot;Microsoft.VisualStudio.Web.Extensions.HTML.ITagNameProvider&quot;)&apos; is not assignable to type &apos;System.Void&apos;.&#x000D;&#x000A;&#x000D;&#x000A;Resulting in: Cannot set import &apos;Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet.TagNameProvider (ContractName=&quot;Microsoft.VisualStudio.Web.Extensions.HTML.ITagNameProvider&quot;)&apos; on part &apos;Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet&apos;.&#x000D;&#x000A;Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet.TagNameProvider (ContractName=&quot;Microsoft.VisualStudio.Web.Extensions.HTML.ITagNameProvider&quot;) --&gt; Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet&#x000D;&#x000A;&#x000D;&#x000A;Resulting in: Cannot get export &apos;Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet (ContractName=&quot;Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.ISPASupportedTagProvider&quot;)&apos; from part &apos;Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet&apos;.&#x000D;&#x000A;Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet (ContractName=&quot;Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.ISPASupportedTagProvider&quot;) --&gt; Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet&#x000D;&#x000A;&#x000D;&#x000A;Resulting in: Cannot set import &apos;Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider.TagNameProvider (ContractName=&quot;Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.ISPASupportedTagProvider&quot;)&apos; on part &apos;Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider&apos;.&#x000D;&#x000A;Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider.TagNameProvider (ContractName=&quot;Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.ISPASupportedTagProvider&quot;) --&gt; Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider&#x000D;&#x000A;&#x000D;&#x000A;Resulting in: Cannot get export &apos;Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider (ContractName=&quot;Microsoft.VisualStudio.Text.Tagging.IViewTaggerProvider&quot;)&apos; from part &apos;Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider&apos;.&#x000D;&#x000A;Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider (ContractName=&quot;Microsoft.VisualStudio.Text.Tagging.IViewTaggerProvider&quot;) --&gt; Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider&#x000D;&#x000A;&#x000D;&#x000A; at System.ComponentModel.Composition.Hosting.CompositionServices.GetExportedValueFromComposedPart(ImportEngine engine, ComposablePart part, ExportDefinition definition)&#x000D;&#x000A; at System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExportedValue(CatalogPart part, ExportDefinition export, Boolean isSharedPart)&#x000D;&#x000A; at System.ComponentModel.Composition.Hosting.CatalogExportProvider.CatalogExport.GetExportedValueCore()&#x000D;&#x000A; at System.ComponentModel.Composition.Primitives.Export.get_Value()&#x000D;&#x000A; at System.ComponentModel.Composition.ExportServices.GetCastedExportedValue[T](Export export)&#x000D;&#x000A; at System.ComponentModel.Composition.ExportServices.&lt;&gt;c__DisplayClass4`2.&lt;CreateStronglyTypedLazyOfTM&gt;b__1()&#x000D;&#x000A; at System.Lazy`1.CreateValue()&#x000D;&#x000A; at System.Lazy`1.LazyInitValue()&#x000D;&#x000A; at System.Lazy`1.get_Value()&#x000D;&#x000A; at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.GatherTaggers(ITextBuffer textBuffer)</description>
</entry>

解码错误为:

System.ComponentModel.Composition.CompositionException:组合产生了一个组合错误,有 2 个根本原因。下面提供了根本原因。查看 CompositionException.Errors 属性以获取更多详细信息。

1) 导出 'Microsoft.VisualStudio.Shell.SVsServiceProvider' 不可分配到类型 'System.Void'。

结果:无法在“Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared”部分设置导入“Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager.VsServiceProvider (ContractName="Microsoft.VisualStudio.Shell.SVsServiceProvider")” .RegistryManager'。
元素:Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager.VsServiceProvider (ContractName="Microsoft.VisualStudio.Shell.SVsServiceProvider") --> Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager

结果:无法从“Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IRegistryManager")”部分导出“Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager” .Extensions.Shared.RegistryManager'。
元素:Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IRegistryManager") --> Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager

结果:无法在“Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider.RegistryManager (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IRegistryManager")”部分设置导入“Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider.RegistryManager” .Web.Extensions.Shared.BufferFeatureManagerProvider'。
元素:Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider.RegistryManager (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IRegistryManager") --> Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared .BufferFeatureManagerProvider

结果:无法从“Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IBufferFeatureManagerProvider")”部分导出“Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider” .Extensions.Shared.BufferFeatureManagerProvider'。
元素:Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IBufferFeatureManagerProvider") --> Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider

结果:无法在部分 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider.BufferFeatureManagerProvider (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IBufferFeatureManagerProvider")' 上设置导入'Microsoft.VisualStudio.JavaScript .Web.Extensions.Classification.SPARegionTaggerProvider'。
元素:Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider.BufferFeatureManagerProvider (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IBufferFeatureManagerProvider") --> Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification .SPARegionTaggerProvider

结果:无法从“Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification”部分导出“Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider (ContractName="Microsoft.VisualStudio.Text.Tagging.IViewTaggerProvider")” .SPARegionTaggerProvider'。
元素:Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider (ContractName="Microsoft.VisualStudio.Text.Tagging.IViewTaggerProvider") --> Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider

2) 导出 'Microsoft.VisualStudio.Web.Extensions.HTML.TagNameProvider (ContractName="Microsoft.VisualStudio.Web.Extensions.HTML.ITagNameProvider")' 不可分配给类型 'System.Void'。

结果:无法在部分“Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet.TagNameProvider (ContractName="Microsoft.VisualStudio.Web.Extensions.HTML.ITagNameProvider")”上设置导入“Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet.TagNameProvider” .Extensions.Shared.SPASupportedTagSet'。
元素:Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet.TagNameProvider (ContractName="Microsoft.VisualStudio.Web.Extensions.HTML.ITagNameProvider") --> Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet

结果:无法从“Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.ISPASupportedTagProvider")”部分导出“Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.ISPASupportedTagProvider")” .Extensions.Shared.SPASupportedTagSet'。
元素:Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.ISPASupportedTagProvider") --> Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet

结果:无法在部分 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider.TagNameProvider (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.ISPASupportedTagProvider")'上设置导入'Microsoft.VisualStudio.JavaScript. .Web.Extensions.Classification.SPARegionTaggerProvider'。
元素:Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider.TagNameProvider (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.ISPASupportedTagProvider") --> Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification .SPARegionTaggerProvider

结果:无法从“Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification”部分导出“Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider (ContractName="Microsoft.VisualStudio.Text.Tagging.IViewTaggerProvider")” .SPARegionTaggerProvider'。
元素:Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider (ContractName="Microsoft.VisualStudio.Text.Tagging.IViewTaggerProvider") --> Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider

在 System.ComponentModel.Composition.Hosting.CompositionServices.GetExportedValueFromComposedPart(ImportEngine 引擎,ComposablePart 部分,ExportDefinition 定义)
在 System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExportedValue(CatalogPart 部分,ExportDefinition 导出,Boolean isSharedPart)
在 System.ComponentModel.Composition.Hosting.CatalogExportProvider.CatalogExport.GetExportedValueCore()
在 System.ComponentModel.Composition.Primitives.Export.get_Value()
在 System.ComponentModel.Composition.ExportServices.GetCastedExportedValue[T](导出导出)
在 System.ComponentModel.Composition.ExportServices.c__DisplayClass4`2.b__1()
在 System.Lazy`1.CreateValue()
在 System.Lazy`1.LazyInitValue()
在 System.Lazy`1.get_Value()
在 Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.GatherTaggers(ITextBuffer textBuffer)

最佳答案

此错误通常是由缓存的元数据损坏引起的。我不知道为什么会发生这种情况,但清除缓存通常会使 Visual Studio 恢复正常工作:

  • Visual Studio 2013 is unable to open the Test Window

  • 然后,当您安装了 Visual Studio 更新 1、2、3 或 4 并且具有针对旧版本构建的其他 Visual Studio 部件(如 Web 工具)时,也会发生此异常。将它们升级到最新版本通常也有很大帮助:
  • https://jessehouwing.net/visual-studio-update-to-webtools-20122-to-resolve/
  • 关于asp.net - 对于这个 VS 2013 异常,我可以/应该做些什么吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19521609/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com