microsoft / VSSDK-Analyzers

Roslyn analyzers for Visual Studio extensions
MIT License
45 stars 28 forks source link

VSSDK003 is created despite override GetAsyncToolWindowFactory being present #142

Closed AdmiralSnyder closed 2 years ago

AdmiralSnyder commented 2 years ago

Bug description

the analyzer doesn't stop complaining even though the GetAsyncToolWindowFactory() method is there. see Screenshots here: https://github.com/AdmiralSnyder/ErrorRepros#20220216---the-analyzer-that-wants-me-to-asynchronously-create-tool-windows-doesnt-stop-whining

see repro here: https://github.com/AdmiralSnyder/ErrorRepros/tree/master/20220216_AsyncPackage_AsyncToolWindow/VsixProjectWithToolWindowCommunity

To Reproduce

Steps or code to reproduce the behavior:

  1. create new project of type image
  2. Go to the ...Package.cs
  3. add an override for the GetAsyncToolWindowFactory method
  4. See error

Expected behavior

the analyzer should not complain anymore

Screenshots

image

AArnott commented 2 years ago

This does not repro for me when I create a vsix project with the project template that ships with VS and add a tool window to it.

It only repros with your project or repro steps of using a community-owned template because that brings in an older version of these analyzers. If you install the latest stable release of the analyzers into your project, the VSSDK003 diagnostic vanishes.

AdmiralSnyder commented 2 years ago

I can confirm, updating the Microsoft.VSSDK.BuildTools nuget package to 17.1.4054 solved it.