For months, I've been getting an exception dialog popping up shortly after launching Visual Studio (2015 or 2017):
An exception has been encountered. This may be caused by an extension.
You can get more information by examining the file 'C:\Users\[MyNameHere]\AppData\Roaming\Microsoft\VisualStudio\15.0_dd233731\ActivityLog.xml'.
I finally decided to investigate, and the only errors listed in the ActivityLog.xml file seemed to involve ShaderTools.CodeAnalysis:
<entry>
<record>1459</record>
<time>2018/05/19 13:48:33.217</time>
<type>Error</type>
<source>Microsoft.VisualStudio.CommonIDE.ExtensibilityHosting.VsShellComponentModelHost</source>
<description>A MEF Component threw an exception at runtime: Microsoft.VisualStudio.Composition.CompositionFailedException:
An exception was thrown while initializing part "ShaderTools.CodeAnalysis.Editor.Implementation.IntelliSense.Completion.Presentation.ToolTipProvider".
---> System.NullReferenceException: Object reference not set to an instance of an object.

at ShaderTools.CodeAnalysis.Editor.Implementation.IntelliSense.Completion.Presentation.ToolTipProvider..ctor(ClassificationTypeMap typeMap)
 --- End of inner exception stack trace ---
 at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.CreateValue()
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.Create()
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveNext(PartLifecycleState nextState)
 at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass15_0.<GetExportedValueHelper>b__0()</description>
</entry>
<entry>
<record>1460</record>
<time>2018/05/19 13:48:33.222</time>
<type>Error</type>
<source>Microsoft.VisualStudio.CommonIDE.ExtensibilityHosting.VsShellComponentModelHost</source>
<description>A MEF Component threw an exception at runtime: Microsoft.VisualStudio.Composition.CompositionFailedException: Import "c9.a" could not be satisfied. ---> Microsoft.VisualStudio.Composition.CompositionFailedException: An exception was thrown while initializing part "ShaderTools.CodeAnalysis.Editor.Implementation.IntelliSense.Completion.Presentation.ToolTipProvider". ---> System.NullReferenceException: Object reference not set to an instance of an object.
 at ShaderTools.CodeAnalysis.Editor.Implementation.IntelliSense.Completion.Presentation.ToolTipProvider..ctor(ClassificationTypeMap typeMap)
--- End of stack trace from previous location where exception was thrown ---
 at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
 --- End of inner exception stack trace ---
 at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.CreateValue()
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.Create()
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveNext(PartLifecycleState nextState)
 at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass15_0.<GetExportedValueHelper>b__0()
 at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.GetValueForImportElement(RuntimePartLifecycleTracker importingPartTracker, RuntimeImport import, RuntimeExport export, Func`3 lazyFactory)
 at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.GetValueForImportSite(RuntimePartLifecycleTracker importingPartTracker, RuntimeImport import)
 at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.SatisfyImports()
 --- End of inner exception stack trace ---
 at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.SatisfyImports()
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.SatisfyImmediateImports()
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveNext(PartLifecycleState nextState)
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.GetValueReadyToExpose()
 at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass15_0.<GetExportedValueHelper>b__0()</description>
</entry>
<entry>
<record>1461</record>
<time>2018/05/19 13:48:33.232</time>
<type>Error</type>
<source>Editor or Editor Extension</source>
<description>Microsoft.VisualStudio.Composition.CompositionFailedException: Import "c9.a" could not be satisfied. ---> Microsoft.VisualStudio.Composition.CompositionFailedException: An exception was thrown while initializing part "ShaderTools.CodeAnalysis.Editor.Implementation.IntelliSense.Completion.Presentation.ToolTipProvider". ---> System.NullReferenceException: Object reference not set to an instance of an object.
 at ShaderTools.CodeAnalysis.Editor.Implementation.IntelliSense.Completion.Presentation.ToolTipProvider..ctor(ClassificationTypeMap typeMap)
--- End of stack trace from previous location where exception was thrown ---
 at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
--- End of stack trace from previous location where exception was thrown ---
 at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
--- End of stack trace from previous location where exception was thrown ---
 at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
 --- End of inner exception stack trace ---
 at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.CreateValue()
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.Create()
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveNext(PartLifecycleState nextState)
 at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass15_0.<GetExportedValueHelper>b__0()
 at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.GetValueForImportElement(RuntimePartLifecycleTracker importingPartTracker, RuntimeImport import, RuntimeExport export, Func`3 lazyFactory)
 at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.GetValueForImportSite(RuntimePartLifecycleTracker importingPartTracker, RuntimeImport import)
 at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.SatisfyImports()
 --- End of inner exception stack trace ---
 at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.SatisfyImports()
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.SatisfyImmediateImports()
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveNext(PartLifecycleState nextState)
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.GetValueReadyToExpose()
 at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass15_0.<GetExportedValueHelper>b__0()
 at Microsoft.VisualStudio.Composition.DelegateServices.<>c__DisplayClass2_0`1.<As>b__0()
 at System.Lazy`1.CreateValue()
 at System.Lazy`1.LazyInitValue()
 at System.Lazy`1.get_Value()
 at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InstantiateExtension[TExtension,TMetadata,TExtensionInstance](Object errorSource, Lazy`2 provider, Func`2 getter)</description>
</entry>
I tried disabling the HLSL Tools extension, and the exception dialog did not appear after the next launch. But that's clearly not an ideal workaround :)
I'm happy to provide more details if necessary; not sure what else would be relevant. Thanks!
For months, I've been getting an exception dialog popping up shortly after launching Visual Studio (2015 or 2017):
I finally decided to investigate, and the only errors listed in the ActivityLog.xml file seemed to involve ShaderTools.CodeAnalysis:
I tried disabling the HLSL Tools extension, and the exception dialog did not appear after the next launch. But that's clearly not an ideal workaround :)
I'm happy to provide more details if necessary; not sure what else would be relevant. Thanks!