增加以下特性即可
[PackageRegistration(UseManagedResourcesOnly = true, AllowsBackgroundLoading = true)]
[ProvideAutoLoad(UICONTEXT.CSharpProject_string, PackageAutoLoadFlags.BackgroundLoad)]
[ProvideAutoLoad(UICONTEXT.VBProject_string, PackageAutoLoadFlags.BackgroundLoad)]
[ProvideAutoLoad(UICONTEXT.FSharpProject_string, PackageAutoLoadFlags.BackgroundLoad)]
官方文档
https://docs.microsoft.com/zh-cn/visualstudio/extensibility/loading-vspackages?view=vs-2019