Extension crash in Visual Studio 2022
mmoderau opened this issue · 2 comments
mmoderau commented
While the editor context menu is present, trying to add a guideline displays a Microsoft Visual Studio popup message:
The 'EditorGuidelinesPackage' package did not load correctly.
The message also instructs to check ActivityLog.xml.
First two entries related to guidelines in the log are:
<entry>
<record>1419</record>
<time>2022/04/21 10:18:25.424</time>
<type>Error</type>
<source>Microsoft.VisualStudio.ComponentModelHost.VsShellComponentModelHost</source>
<description>A MEF Component threw an exception at runtime: Microsoft.VisualStudio.Composition.CompositionFailedException: An exception was thrown while initializing part "EditorGuidelines.ColumnGuideAdornmentFactory". ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.ApplicationInsights, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Nie można odnaleźć określonego pliku.
 at EditorGuidelines.ColumnGuideAdornmentFactory.OnImportsSatisfied()
 --- End of inner exception stack trace ---
 at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.InvokeOnImportsSatisfied()
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.NotifyTransitiveImportsSatisfied()
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveNext(PartLifecycleState nextState)
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToState(PartLifecycleState requiredState)
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.GetValueReadyToExpose()
 at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass15_0.<GetExportedValueHelper>b__0()</description>
</entry>
<entry>
<record>1463</record>
<time>2022/04/21 10:18:36.087</time>
<type>Error</type>
<source>Editor or Editor Extension</source>
<description>Microsoft.VisualStudio.Composition.CompositionFailedException: An exception was thrown while initializing part "EditorGuidelines.ColumnGuideAdornmentFactory". ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.ApplicationInsights, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Nie można odnaleźć określonego pliku.
 at EditorGuidelines.ColumnGuideAdornmentFactory.OnImportsSatisfied()
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
 --- End of inner exception stack trace ---
 at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.InvokeOnImportsSatisfied()
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.NotifyTransitiveImportsSatisfied()
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveNext(PartLifecycleState nextState)
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToState(PartLifecycleState requiredState)
 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 Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InstantiateExtension[TExtension,TMetadata](Object errorSource, Lazy`2 provider)</description>
</entry>
Installed extensions:
Editor Guidelines
Visual Studio Theme Pack
Visual Studio IntelliCode
NuGetRecommender
Visual Studio Rich Navigation
JetBrains ReSharper
pharring commented
Thanks for the bug report, @mmoderau
This is almost certainly a duplicate of #87
There is a workaround: #87 (comment)
pharring commented
Closing as a likely duplicate. Please feel free to re-open if it's not actually a duplicate.