Update pkg loader to not filter out packages with empty dependency sets (#620)

This was causing PackageLoader.GetLatestVersionAsync to not find any versions of analyzer packages (which don't typically have dependency sets).

Fixes #555
This commit is contained in:
Mike Rousos 2021-06-14 17:22:12 -04:00 коммит произвёл GitHub
Родитель 13529f4332
Коммит 57152ce9c7
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 8 добавлений и 1 удалений

Просмотреть файл

@ -155,8 +155,15 @@ namespace Microsoft.DotNet.UpgradeAssistant.MSBuild
return results
.Where(r =>
{
var unsupported = tfmSet;
// If the package has no dependency sets, then include it (as it may be build tools, analyzers, etc.).
if (!r.DependencySets.Any())
{
return true;
}
// If the package has dependency sets, only include it if there are dependency sets for each
// of the TFMs that need to be supported.
var unsupported = tfmSet;
foreach (var dep in r.DependencySets)
{
foreach (var t in unsupported)