>
>
>
Issues: PVS-Studio plugin for Visual St…

Valerii Filatov
Articles: 12

Issues: PVS-Studio plugin for Visual Studio

Several users have reported issues with the PVS-Studio plugin for Visual Studio version 17.12 and later, preventing the plugin to be run. In this post, we'll explain the issue and suggest possible solutions.

Some users of the PVS-Studio static analyzer experience the plugin crash due to an internal error when using the plugin for Microsoft Visual Studio 2022. This failure is followed by an extensive error message.

Exception message:

One or more errors occurred.

Exception type:

System.AggregateException

Stack: at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)

at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)

at System.Threading.Tasks.Task.Wait()

at ProgramVerificationSystems.PVSStudio.PVSStudio.InitializeErrorListWindow(Boolean isFromPackageLoadedEvent) in D:\JenkinsProjects\workspace\proj_PVS_Setup_Docker\WorkDir\PVS-Studio\PVS-Studio\VsPkg.cs:line 2414

Inner Exception:

Exception message:

Exception from HRESULT: 0x80042007

Exception type:

System.Runtime.InteropServices.COMException

Stack: at Microsoft.VisualStudio.Shell.Interop.IVsShell5.LoadPackageWithContext(Guid& packageGuid, Int32 reason, Guid& context)....

This error occurs because Visual Studio 2022 17.12 has changed the IDE API for plugin interaction. That's why, in PVS-Studio 7.33, we've adjusted the plugin for Visual Studio to ensure compatibility with this version 17.22 or later and the IDE.

You have several options to solve the issue:

  • Update PVS-Studio analyzer to version 7.33 or later.
  • Roll back Visual Studio 2022 to an earlier version.

If the issue persists or you encounter another problem while using the analyzer, please do not hesitate to inform us about it using the special feedback form on the website. We'll try our best to assist you!