对于这个VS 2013例外,我能做什么/应该做什么?

时间:2013-10-22 15:05:59

标签: asp.net visual-studio-2013

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

然后说要查看此文件:

C:\用户\粘土\应用程序数据\漫游\微软\ 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: 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.

1) The export 'Microsoft.VisualStudio.Shell.SVsServiceProvider' is not assignable to type 'System.Void'.

Resulting in: Cannot set import 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager.VsServiceProvider (ContractName="Microsoft.VisualStudio.Shell.SVsServiceProvider")' on part 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager'.
Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager.VsServiceProvider (ContractName="Microsoft.VisualStudio.Shell.SVsServiceProvider") -->  Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager

Resulting in: Cannot get export 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IRegistryManager")' from part 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager'.
Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IRegistryManager") -->  Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager

Resulting in: Cannot set import 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider.RegistryManager (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IRegistryManager")' on part 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider'.
Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider.RegistryManager (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IRegistryManager") -->  Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider

Resulting in: Cannot get export 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IBufferFeatureManagerProvider")' from part 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider'.
Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IBufferFeatureManagerProvider") -->  Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider

Resulting in: Cannot set import 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider.BufferFeatureManagerProvider (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IBufferFeatureManagerProvider")' on part 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider'.
Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider.BufferFeatureManagerProvider (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IBufferFeatureManagerProvider") -->  Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider

Resulting in: Cannot get export 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider (ContractName="Microsoft.VisualStudio.Text.Tagging.IViewTaggerProvider")' from part 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider'.
Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider (ContractName="Microsoft.VisualStudio.Text.Tagging.IViewTaggerProvider") -->  Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider

2) The export 'Microsoft.VisualStudio.Web.Extensions.HTML.TagNameProvider (ContractName="Microsoft.VisualStudio.Web.Extensions.HTML.ITagNameProvider")' is not assignable to type 'System.Void'.

Resulting in: Cannot set import 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet.TagNameProvider (ContractName="Microsoft.VisualStudio.Web.Extensions.HTML.ITagNameProvider")' on part 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet'.
Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet.TagNameProvider (ContractName="Microsoft.VisualStudio.Web.Extensions.HTML.ITagNameProvider") -->  Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet

Resulting in: Cannot get export 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.ISPASupportedTagProvider")' from part 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet'.
Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.ISPASupportedTagProvider") -->  Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet

Resulting in: Cannot set import 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider.TagNameProvider (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.ISPASupportedTagProvider")' on part 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider'.
Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider.TagNameProvider (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.ISPASupportedTagProvider") -->  Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider

Resulting in: Cannot get export 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider (ContractName="Microsoft.VisualStudio.Text.Tagging.IViewTaggerProvider")' from part 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider'.
Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider (ContractName="Microsoft.VisualStudio.Text.Tagging.IViewTaggerProvider") -->  Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider

   at System.ComponentModel.Composition.Hosting.CompositionServices.GetExportedValueFromComposedPart(ImportEngine engine, ComposablePart part, ExportDefinition definition)
   at System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExportedValue(CatalogPart part, ExportDefinition export, Boolean isSharedPart)
   at System.ComponentModel.Composition.Hosting.CatalogExportProvider.CatalogExport.GetExportedValueCore()
   at System.ComponentModel.Composition.Primitives.Export.get_Value()
   at System.ComponentModel.Composition.ExportServices.GetCastedExportedValue[T](Export export)
   at System.ComponentModel.Composition.ExportServices.c__DisplayClass4`2.b__1()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at System.Lazy`1.get_Value()
   at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.GatherTaggers(ITextBuffer textBuffer)

1 个答案:

答案 0 :(得分:9)

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

然后,当您安装Visual Studio更新1,2,3或4并且具有针对旧版本构建的其他可视演播室部件(如Web工具)时,也会发生此异常。将它们升级到最新版本通常也会有所帮助: