Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there something I can/should do about this VS 2013 exception?

On loading my ASP.NET app/site, I get this err msg: "An exception has been encountered. This may be caused by an extension."

It then says to look in this file:

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

...in which I did find three entries that may be related to the problem, yet they are "Greek to me". Due to their voluminosity, I am just including the first one here:

  <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>

Decoded error is:

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)
like image 420
B. Clay Shannon-B. Crow Raven Avatar asked Oct 22 '13 15:10

B. Clay Shannon-B. Crow Raven


People also ask

How do I stop Visual Studio from breaking on exception?

To turn off stop on exceptions press " Ctrl + Alt + E ". This will open the Exceptions window . Untick "Common Language Runtime Exceptions - Thrown". That would prevent it from pausing from within the delegate, but not when it's rethrown on Wait .

How do I fix unhandled exception in Visual Studio?

To change this setting for a particular exception, select the exception, right-click to show the shortcut menu, and select Continue When Unhandled in User Code. You may also change the setting for an entire category of exceptions, such as the entire Common Language Runtime exceptions).

How do I reset Visual Studio exceptions?

To set Visual Studio debugger options, select Tools > Options, and under Debugging select or deselect the boxes next to the General options. You can restore all default settings with Tools > Import and Export Settings > Reset all settings.

How do I break all exceptions in Visual Studio?

From Visual Studio 2015 and onward, you need to go to the "Exception Settings" dialog ( Ctrl + Alt + E ) and check off the "Common Language Runtime Exceptions" (or a specific one you want i.e. ArgumentNullException ) to make it break on handled exceptions.


Video Answer


1 Answers

This error is often caused by a corruption in the cached metadata. Why this occurs I do not know, but clearing the cache will usually return Visual Studio to working order:

  • Visual Studio 2013 is unable to open the Test Window

And then this exception will also occur when you have installed Visual Studio update 1,2,3 or 4 and have other visual studio parts (like the web tools) that were built against an older version. Upgrading them to the latest version usually also helps quite a bit:

  • https://jessehouwing.net/visual-studio-update-to-webtools-20122-to-resolve/
like image 195
jessehouwing Avatar answered Sep 19 '22 19:09

jessehouwing