未验证 提交 57041d56 编写于 作者: J Joey Robichaud 提交者: GitHub

Merge pull request #39532 from JoeRobich/is-packageservice-enabled

Check that PackageInstallerService is enabled before getting sources
......@@ -54,7 +54,7 @@ public sealed override async Task RegisterCodeFixesAsync(CodeFixContext context)
: null;
var installerService = GetPackageInstallerService(document);
var packageSources = searchNuGetPackages && symbolSearchService != null && installerService != null
var packageSources = searchNuGetPackages && symbolSearchService != null && installerService?.IsEnabled(document.Project.Id) == true
? installerService.GetPackageSources()
: ImmutableArray<PackageSource>.Empty;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册