diff --git a/src/Cli/dotnet/NugetPackageDownloader/INuGetPackageDownloader.cs b/src/Cli/dotnet/NugetPackageDownloader/INuGetPackageDownloader.cs index 1f9cef225d32..e16ad955e333 100644 --- a/src/Cli/dotnet/NugetPackageDownloader/INuGetPackageDownloader.cs +++ b/src/Cli/dotnet/NugetPackageDownloader/INuGetPackageDownloader.cs @@ -24,7 +24,7 @@ Task GetPackageUrl(PackageId packageId, Task> ExtractPackageAsync(string packagePath, DirectoryPath targetFolder); - Task GetLatestPackageVerion(PackageId packageId, + Task GetLatestPackageVersion(PackageId packageId, PackageSourceLocation packageSourceLocation = null, bool includePreview = false); } diff --git a/src/Cli/dotnet/NugetPackageDownloader/NuGetPackageDownloader.cs b/src/Cli/dotnet/NugetPackageDownloader/NuGetPackageDownloader.cs index e66df577b0fe..5a67539a7661 100644 --- a/src/Cli/dotnet/NugetPackageDownloader/NuGetPackageDownloader.cs +++ b/src/Cli/dotnet/NugetPackageDownloader/NuGetPackageDownloader.cs @@ -85,7 +85,7 @@ public async Task DownloadPackageAsync(PackageId packageId, { CancellationToken cancellationToken = CancellationToken.None; - (var source, var resolvedPackageVersion) = await GetPackageSourceAndVerion(packageId, packageVersion, + (var source, var resolvedPackageVersion) = await GetPackageSourceAndVersion(packageId, packageVersion, packageSourceLocation, includePreview); FindPackageByIdResource resource = null; @@ -161,9 +161,13 @@ public async Task GetPackageUrl(PackageId packageId, PackageSourceLocation packageSourceLocation = null, bool includePreview = false) { - (var source, var resolvedPackageVersion) = await GetPackageSourceAndVerion(packageId, packageVersion, packageSourceLocation, includePreview); - + (var source, var resolvedPackageVersion) = await GetPackageSourceAndVersion(packageId, packageVersion, packageSourceLocation, includePreview); + SourceRepository repository = GetSourceRepository(source); + if (repository.PackageSource.IsLocal) + { + return Path.Combine(repository.PackageSource.Source, $"{packageId}.{resolvedPackageVersion}.nupkg"); + } ServiceIndexResourceV3 serviceIndexResource = repository.GetResourceAsync().Result; IReadOnlyList packageBaseAddress = @@ -213,7 +217,7 @@ public async Task> ExtractPackageAsync(string packagePath, D return allFilesInPackage; } - private async Task<(PackageSource, NuGetVersion)> GetPackageSourceAndVerion(PackageId packageId, + private async Task<(PackageSource, NuGetVersion)> GetPackageSourceAndVersion(PackageId packageId, NuGetVersion packageVersion = null, PackageSourceLocation packageSourceLocation = null, bool includePreview = false) @@ -422,7 +426,7 @@ await Task.WhenAll( .SelectMany(result => result.foundPackages.Select(package => (result.source, package))); if (!accumulativeSearchResults.Any()) - { + { throw new NuGetPackageNotFoundException( string.Format( LocalizableStrings.IsNotFoundInNuGetFeeds, @@ -565,7 +569,7 @@ bool TryGetPackageMetadata( return (source, foundPackages); } - public async Task GetLatestPackageVerion(PackageId packageId, + public async Task GetLatestPackageVersion(PackageId packageId, PackageSourceLocation packageSourceLocation = null, bool includePreview = false) { diff --git a/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs b/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs index 6253cb93224a..beccbae68996 100644 --- a/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs +++ b/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs @@ -34,8 +34,10 @@ internal abstract class InstallingWorkloadCommand : WorkloadCommandBase protected readonly string _downloadToCacheOption; protected readonly string _dotnetPath; protected readonly string _userProfileDir; + protected readonly bool _checkIfManifestExist; protected readonly ReleaseVersion _sdkVersion; protected readonly SdkFeatureBand _sdkFeatureBand; + protected readonly SdkFeatureBand _installedFeatureBand; protected readonly string _fromRollbackDefinition; protected readonly PackageSourceLocation _packageSourceLocation; protected IWorkloadResolver _workloadResolver; @@ -54,7 +56,8 @@ public InstallingWorkloadCommand( string dotnetDir, string userProfileDir, string tempDirPath, - string version) + string version, + string installedFeatureBand = null) : base(parseResult, reporter: reporter, tempDirPath: tempDirPath, nugetPackageDownloader: nugetPackageDownloader) { _printDownloadLinkOnly = parseResult.GetValueForOption(InstallingWorkloadCommandParser.PrintDownloadLinkOnlyOption); @@ -63,15 +66,21 @@ public InstallingWorkloadCommand( _downloadToCacheOption = parseResult.GetValueForOption(InstallingWorkloadCommandParser.DownloadToCacheOption); _dotnetPath = dotnetDir ?? Path.GetDirectoryName(Environment.ProcessPath); _userProfileDir = userProfileDir ?? CliFolderPathCalculator.DotnetUserProfileFolderPath; - _sdkVersion = WorkloadOptionsExtensions.GetValidatedSdkVersion(parseResult.GetValueForOption(InstallingWorkloadCommandParser.VersionOption), version, _dotnetPath, _userProfileDir); + _checkIfManifestExist = !(_printDownloadLinkOnly); // don't check for manifest existence when print download link is passed + _sdkVersion = WorkloadOptionsExtensions.GetValidatedSdkVersion(parseResult.GetValueForOption(InstallingWorkloadCommandParser.VersionOption), version, _dotnetPath, _userProfileDir, _checkIfManifestExist); _sdkFeatureBand = new SdkFeatureBand(_sdkVersion); + + _installedFeatureBand = installedFeatureBand == null ? new SdkFeatureBand(DotnetFiles.VersionFileObject.BuildNumber) : new SdkFeatureBand(installedFeatureBand); + _fromRollbackDefinition = parseResult.GetValueForOption(InstallingWorkloadCommandParser.FromRollbackFileOption); var configOption = parseResult.GetValueForOption(InstallingWorkloadCommandParser.ConfigOption); var sourceOption = parseResult.GetValueForOption(InstallingWorkloadCommandParser.SourceOption); _packageSourceLocation = string.IsNullOrEmpty(configOption) && (sourceOption == null || !sourceOption.Any()) ? null : new PackageSourceLocation(string.IsNullOrEmpty(configOption) ? null : new FilePath(configOption), sourceFeedOverrides: sourceOption); - var sdkWorkloadManifestProvider = new SdkDirectoryWorkloadManifestProvider(_dotnetPath, _sdkVersion.ToString(), userProfileDir); + + var sdkWorkloadManifestProvider = new SdkDirectoryWorkloadManifestProvider(_dotnetPath, _installedFeatureBand.ToString(), userProfileDir); _workloadResolver = workloadResolver ?? WorkloadResolver.Create(sdkWorkloadManifestProvider, _dotnetPath, _sdkVersion.ToString(), _userProfileDir); + _workloadInstallerFromConstructor = workloadInstaller; _workloadManifestUpdaterFromConstructor = workloadManifestUpdater; } @@ -121,6 +130,7 @@ protected async Task> GetDownloads(IEnumerable> GetDownloads(IEnumerable GetInstalledWorkloads(bool fromPreviousSdk) { - var currentFeatureBand = new SdkFeatureBand(_sdkVersion); + //var currentFeatureBand = new SdkFeatureBand(_installedFeatureBand.ToString()); if (fromPreviousSdk) { var priorFeatureBands = _workloadInstaller.GetWorkloadInstallationRecordRepository().GetFeatureBandsWithInstallationRecords() - .Where(featureBand => featureBand.CompareTo(currentFeatureBand) < 0); + .Where(featureBand => featureBand.CompareTo(_installedFeatureBand) < 0); if (priorFeatureBands.Any()) { var maxPriorFeatureBand = priorFeatureBands.Max(); @@ -167,7 +177,7 @@ protected IEnumerable GetInstalledWorkloads(bool fromPreviousSdk) } else { - var workloads = _workloadInstaller.GetWorkloadInstallationRecordRepository().GetInstalledWorkloads(currentFeatureBand); + var workloads = _workloadInstaller.GetWorkloadInstallationRecordRepository().GetInstalledWorkloads(_installedFeatureBand); return workloads ?? Enumerable.Empty(); } diff --git a/src/Cli/dotnet/commands/dotnet-sdk/check/SdkOutputWriter.cs b/src/Cli/dotnet/commands/dotnet-sdk/check/SdkOutputWriter.cs index 9d3b924b28fe..0bbb6783c5a7 100644 --- a/src/Cli/dotnet/commands/dotnet-sdk/check/SdkOutputWriter.cs +++ b/src/Cli/dotnet/commands/dotnet-sdk/check/SdkOutputWriter.cs @@ -36,6 +36,7 @@ public void PrintSdkInfo() if (NewFeatureBandAvailable()) { _reporter.WriteLine(); + // advertise newest feature band _reporter.WriteLine(string.Format(LocalizableStrings.NewFeatureBandMessage, NewestFeatureBandAvailable())); } } diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/IInstaller.cs b/src/Cli/dotnet/commands/dotnet-workload/install/IInstaller.cs index 88af4bc05cae..a33517254982 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/IInstaller.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/IInstaller.cs @@ -66,5 +66,6 @@ public WorkloadDownload(string id, string nuGetPackageId, string nuGetPackageVer NuGetPackageId = nuGetPackageId; NuGetPackageVersion = nuGetPackageVersion; } + } } diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/LocalizableStrings.resx b/src/Cli/dotnet/commands/dotnet-workload/install/LocalizableStrings.resx index 04303d2f40d5..69e62a8c442c 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/LocalizableStrings.resx +++ b/src/Cli/dotnet/commands/dotnet-workload/install/LocalizableStrings.resx @@ -255,8 +255,8 @@ Failed to download manifest package {0}. - - Failed to resolve manifest package URL {0}. + + Manifest package not resolved. Manifest package or URL for {0} doesn't exist. MSI installations are only supported on Windows. @@ -342,4 +342,4 @@ Manifest MSI not found in NuGet package {0} - \ No newline at end of file + diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs index 9b058868a940..4c1cc42b577c 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs @@ -41,10 +41,11 @@ public WorkloadInstallCommand( string userProfileDir = null, string tempDirPath = null, string version = null, - IReadOnlyCollection workloadIds = null) + IReadOnlyCollection workloadIds = null, + string installedFeatureBand = null) : base(parseResult, reporter: reporter, workloadResolver: workloadResolver, workloadInstaller: workloadInstaller, nugetPackageDownloader: nugetPackageDownloader, workloadManifestUpdater: workloadManifestUpdater, - dotnetDir: dotnetDir, userProfileDir: userProfileDir, tempDirPath: tempDirPath, version: version) + dotnetDir: dotnetDir, userProfileDir: userProfileDir, tempDirPath: tempDirPath, version: version, installedFeatureBand: installedFeatureBand) { _skipManifestUpdate = parseResult.GetValueForOption(WorkloadInstallCommandParser.SkipManifestUpdateOption); _workloadIds = workloadIds ?? parseResult.GetValueForArgument(WorkloadInstallCommandParser.WorkloadIdArgument).ToList().AsReadOnly(); diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs index 6fe1fb375903..6cd10324b316 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs @@ -249,13 +249,35 @@ public async Task> GetManifestPackageDownloadsAsyn { try { + var packageId = _workloadManifestInstaller.GetManifestPackageId(new ManifestId(manifest.Id), _sdkFeatureBand); - var latestVersion = await _nugetPackageDownloader.GetLatestPackageVerion(packageId, packageSourceLocation: _packageSourceLocation, includePreview: includePreviews); - downloads.Add(new WorkloadDownload(manifest.Id, packageId.ToString(), latestVersion.ToString())); + + bool success; + (success, var latestVersion) = await GetPackageVersion(packageId, packageSourceLocation: _packageSourceLocation, includePreview: includePreviews); + if (success) + { + downloads.Add(new WorkloadDownload(manifest.Id, packageId.ToString(), latestVersion.ToString())); + } + if (!success) + { + var newFeatureBand = new SdkFeatureBand(manifest.ManifestFeatureBand); + var newPackageId = _workloadManifestInstaller.GetManifestPackageId(new ManifestId(manifest.Id), newFeatureBand); + + (success, latestVersion) = await GetPackageVersion(newPackageId, packageSourceLocation: _packageSourceLocation, includePreview: includePreviews); + + if (success) + { + downloads.Add(new WorkloadDownload(manifest.Id, newPackageId.ToString(), latestVersion.ToString())); + } + } + if (!success) + { + _reporter.WriteLine(string.Format(LocalizableStrings.ManifestPackageUrlNotResolved, packageId)); + } } catch { - _reporter.WriteLine(string.Format(LocalizableStrings.FailedToGetPackageManifestUrl, manifest.Id)); + _reporter.WriteLine(string.Format(LocalizableStrings.ManifestPackageUrlNotResolved, manifest.Id)); } } return downloads; @@ -404,7 +426,7 @@ private async Task NewerManifestPackageExists(ManifestId manifest) try { var currentVersion = NuGetVersion.Parse(_workloadResolver.GetManifestVersion(manifest.ToString())); - var latestVersion = await _nugetPackageDownloader.GetLatestPackageVerion(_workloadManifestInstaller.GetManifestPackageId(manifest, _sdkFeatureBand)); + var latestVersion = await _nugetPackageDownloader.GetLatestPackageVersion(_workloadManifestInstaller.GetManifestPackageId(manifest, _sdkFeatureBand)); return latestVersion > currentVersion; } catch (Exception) @@ -512,7 +534,22 @@ private string GetOfflinePackagePath(SdkFeatureBand sdkFeatureBand, ManifestId m } } - private string GetAdvertisingManifestPath(SdkFeatureBand featureBand, ManifestId manifestId) => + private async Task<(bool, NuGetVersion)> GetPackageVersion(PackageId packageId, PackageSourceLocation packageSourceLocation = null, bool includePreview = false) + { + try + { + var latestVersion = await _nugetPackageDownloader.GetLatestPackageVersion(packageId, packageSourceLocation: _packageSourceLocation, includePreview: includePreview); + return (true, latestVersion); + } + catch (NuGetPackageNotFoundException) + { + return (false, null); + } + + } + + +private string GetAdvertisingManifestPath(SdkFeatureBand featureBand, ManifestId manifestId) => Path.Combine(_userProfileDir, "sdk-advertising", featureBand.ToString(), manifestId.ToString()); } } diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadOptionsExtensions.cs b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadOptionsExtensions.cs index 83c1e9437df1..cae4c9567933 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadOptionsExtensions.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadOptionsExtensions.cs @@ -17,7 +17,7 @@ namespace Microsoft.DotNet.Workloads.Workload.Install { internal class WorkloadOptionsExtensions { - internal static ReleaseVersion GetValidatedSdkVersion(string versionOption, string providedVersion, string dotnetPath, string userProfileDir) + internal static ReleaseVersion GetValidatedSdkVersion(string versionOption, string providedVersion, string dotnetPath, string userProfileDir, bool checkIfFeatureBandManifestsExist) { if (string.IsNullOrEmpty(versionOption)) @@ -27,7 +27,7 @@ internal static ReleaseVersion GetValidatedSdkVersion(string versionOption, stri else { var manifests = new SdkDirectoryWorkloadManifestProvider(dotnetPath, versionOption, userProfileDir).GetManifests(); - if (!manifests.Any()) + if (!manifests.Any() && checkIfFeatureBandManifestsExist) { throw new GracefulException(string.Format(LocalizableStrings.NoManifestsExistForFeatureBand, new SdkFeatureBand(versionOption).ToString()), isUserError: false); } diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.cs.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.cs.xlf index f43388ed95e7..1557f47e0901 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.cs.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.cs.xlf @@ -67,11 +67,6 @@ Nepovedlo se extrahovat informace z MSI: {0} - - Failed to resolve manifest package URL {0}. - Nepovedlo se přeložit adresu URL balíčku manifestu {0}. - - Failed to install manifest {0} version {1}: {2}. Nepodařilo se nainstalovat manifest {0} verze {1}: {2}. @@ -167,6 +162,11 @@ Instalační služba MSI manifestu se nenašla v balíčku NuGet {0}. + + Manifest package not resolved. Manifest package or URL for {0} doesn't exist. + Manifest package not resolved. Manifest package or URL for {0} doesn't exist. + + Installing {0} Instaluje se {0}. diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.de.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.de.xlf index 4769b3e34b19..cdce9b38d728 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.de.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.de.xlf @@ -67,11 +67,6 @@ Fehler beim Extrahieren von Informationen aus MSI: {0} - - Failed to resolve manifest package URL {0}. - Fehler beim Auflösen der Manifestpaket-URL {0}. - - Failed to install manifest {0} version {1}: {2}. Fehler beim Installieren des Manifests "{0}", Version {1}: {2}. @@ -167,6 +162,11 @@ Manifest-MSI wurde im NuGet-Paket {0} nicht gefunden. + + Manifest package not resolved. Manifest package or URL for {0} doesn't exist. + Manifest package not resolved. Manifest package or URL for {0} doesn't exist. + + Installing {0} {0} wird installiert diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.es.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.es.xlf index 20849ceb53f0..5f971892ce8e 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.es.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.es.xlf @@ -67,11 +67,6 @@ No se pudo extraer información de MSI: {0} - - Failed to resolve manifest package URL {0}. - No se pudo resolver la dirección URL del paquete de manifiesto {0}. - - Failed to install manifest {0} version {1}: {2}. No se pudo instalar el manifiesto {0}, versión {1}: {2}. @@ -167,6 +162,11 @@ No se encontró el MSI del manifiesto en el paquete NuGet {0} + + Manifest package not resolved. Manifest package or URL for {0} doesn't exist. + Manifest package not resolved. Manifest package or URL for {0} doesn't exist. + + Installing {0} Instalando {0} diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.fr.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.fr.xlf index 09b0d9bdad4d..b84c2e3e8f14 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.fr.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.fr.xlf @@ -67,11 +67,6 @@ Échec de l’extraction des informations de MSI : {0} - - Failed to resolve manifest package URL {0}. - Échec de la résolution de l’URL du package de manifeste {0}. - - Failed to install manifest {0} version {1}: {2}. Impossible d'installer la {0} version de manifeste {1}: {2} @@ -167,6 +162,11 @@ MSI de manifeste introuvable dans le package NuGet {0} + + Manifest package not resolved. Manifest package or URL for {0} doesn't exist. + Manifest package not resolved. Manifest package or URL for {0} doesn't exist. + + Installing {0} Installation en cours de {0} diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.it.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.it.xlf index dc9cea11ff0b..9b6b67ff92f4 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.it.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.it.xlf @@ -67,11 +67,6 @@ Impossibile estrarre informazioni dall'identità del servizio gestito: {0} - - Failed to resolve manifest package URL {0}. - Non è stato possibile risolvere l'URL del pacchetto del manifesto {0}. - - Failed to install manifest {0} version {1}: {2}. Non è stato possibile installare il manifesto {0}, versione {1}: {2}. @@ -167,6 +162,11 @@ L'identità del servizio gestita del manifesto non è stata trovata nel pacchetto NuGet {0} + + Manifest package not resolved. Manifest package or URL for {0} doesn't exist. + Manifest package not resolved. Manifest package or URL for {0} doesn't exist. + + Installing {0} Installazione di {0} diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ja.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ja.xlf index 217208388d47..df5b7e3c76f4 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ja.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ja.xlf @@ -67,11 +67,6 @@ MSI から情報を抽出できませんでした: {0} - - Failed to resolve manifest package URL {0}. - マニフェストパッケージ URL {0} を解決できませんでした。 - - Failed to install manifest {0} version {1}: {2}. マニフェスト {0} のバージョン {1} をインストールできませんでした: {2}。 @@ -167,6 +162,11 @@ NuGet パッケージ {0} にマニフェスト MSI が見つかりません + + Manifest package not resolved. Manifest package or URL for {0} doesn't exist. + Manifest package not resolved. Manifest package or URL for {0} doesn't exist. + + Installing {0} {0} をインストールしています diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ko.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ko.xlf index 0b087693879a..c0eaef257208 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ko.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ko.xlf @@ -67,11 +67,6 @@ MSI에서 정보를 추출하지 못했습니다. {0} - - Failed to resolve manifest package URL {0}. - 매니페스트 패키지 URL {0}을(를) 확인하지 못했습니다. - - Failed to install manifest {0} version {1}: {2}. 매니페스트 {0} 버전 {1}: {2}을 설치하지 못했습니다. @@ -167,6 +162,11 @@ NuGet 패키지 {0}에서 매니페스트 MSI를 찾을 수 없습니다. + + Manifest package not resolved. Manifest package or URL for {0} doesn't exist. + Manifest package not resolved. Manifest package or URL for {0} doesn't exist. + + Installing {0} {0} 설치 중 diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pl.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pl.xlf index 0eef83d1a842..b978aecceef7 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pl.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pl.xlf @@ -67,11 +67,6 @@ Nie można wyodrębnić informacji z pliku MSI: {0} - - Failed to resolve manifest package URL {0}. - Nie można rozpoznać adresu URL pakietu manifestu {0}. - - Failed to install manifest {0} version {1}: {2}. Instalowanie manifestu {0} w wersji {1} nie powiodło się: {2}. @@ -167,6 +162,11 @@ Nie znaleziono pliku MSI manifestu w pakiecie NuGet {0} + + Manifest package not resolved. Manifest package or URL for {0} doesn't exist. + Manifest package not resolved. Manifest package or URL for {0} doesn't exist. + + Installing {0} Instalowanie {0} diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pt-BR.xlf index 06e99fc463b3..283e715db05c 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pt-BR.xlf @@ -67,11 +67,6 @@ Falha ao extrair informações do MSI: {0} - - Failed to resolve manifest package URL {0}. - Falha ao resolver URL do pacote de manifesto {0}. - - Failed to install manifest {0} version {1}: {2}. Falha ao instalar o manifesto {0} versão {1}: {2}. @@ -167,6 +162,11 @@ MSI do manifesto não encontrado no pacote NuGet {0} + + Manifest package not resolved. Manifest package or URL for {0} doesn't exist. + Manifest package not resolved. Manifest package or URL for {0} doesn't exist. + + Installing {0} Instalando {0} diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ru.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ru.xlf index e94a85bce1dc..4384717145be 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ru.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ru.xlf @@ -67,11 +67,6 @@ Не удалось извлечь информацию из MSI: {0} - - Failed to resolve manifest package URL {0}. - Не удалось разрешить URL-адрес пакета манифеста {0}. - - Failed to install manifest {0} version {1}: {2}. Не удалось установить манифест {0} версии {1}: {2}. @@ -167,6 +162,11 @@ MSI манифеста не найден в пакете NuGet {0} + + Manifest package not resolved. Manifest package or URL for {0} doesn't exist. + Manifest package not resolved. Manifest package or URL for {0} doesn't exist. + + Installing {0} Установка {0} diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.tr.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.tr.xlf index 070d7a34650e..21cf4da32d21 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.tr.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.tr.xlf @@ -67,11 +67,6 @@ MSI'dan bilgi ayıklanamadı: {0} - - Failed to resolve manifest package URL {0}. - {0} bildirim paketi URL'si çözümlenemedi. - - Failed to install manifest {0} version {1}: {2}. {0} bildirimi sürüm {1} yüklenemedi:{2}. @@ -167,6 +162,11 @@ {0} NuGet paketinde bildirim MSI'sı bulunamadı + + Manifest package not resolved. Manifest package or URL for {0} doesn't exist. + Manifest package not resolved. Manifest package or URL for {0} doesn't exist. + + Installing {0} {0} yükleniyor diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hans.xlf index 91c8103155df..53f8fbefc27c 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hans.xlf @@ -67,11 +67,6 @@ 无法从 MSI 中提取信息: {0} - - Failed to resolve manifest package URL {0}. - 未能解析清单程序包 URL {0}。 - - Failed to install manifest {0} version {1}: {2}. 未能安装清单 {0} 版本 {1}: {2}。 @@ -167,6 +162,11 @@ 在 NuGet 包 {0} 中找不到清单 MSI + + Manifest package not resolved. Manifest package or URL for {0} doesn't exist. + Manifest package not resolved. Manifest package or URL for {0} doesn't exist. + + Installing {0} 正在安装 {0} diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hant.xlf index 22a6bdf8ee9f..83848e104bd8 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hant.xlf @@ -67,11 +67,6 @@ 無法從 MSI 擷取資訊: {0} - - Failed to resolve manifest package URL {0}. - 無法解析資訊清單套件 URL {0}。 - - Failed to install manifest {0} version {1}: {2}. 無法安裝資訊清單 {0} 版本 {1}: {2}。 @@ -167,6 +162,11 @@ 在 NuGet 套件 {0} 中找不到資訊清單 MSI + + Manifest package not resolved. Manifest package or URL for {0} doesn't exist. + Manifest package not resolved. Manifest package or URL for {0} doesn't exist. + + Installing {0} 安裝 {0} diff --git a/src/Cli/dotnet/commands/dotnet-workload/repair/WorkloadRepairCommand.cs b/src/Cli/dotnet/commands/dotnet-workload/repair/WorkloadRepairCommand.cs index 7e9d071f43e9..1aba15b3dfec 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/repair/WorkloadRepairCommand.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/repair/WorkloadRepairCommand.cs @@ -42,7 +42,7 @@ public WorkloadRepairCommand( { _dotnetPath = dotnetDir ?? Path.GetDirectoryName(Environment.ProcessPath); userProfileDir ??= CliFolderPathCalculator.DotnetUserProfileFolderPath; - _sdkVersion = WorkloadOptionsExtensions.GetValidatedSdkVersion(parseResult.GetValueForOption(WorkloadRepairCommandParser.VersionOption), version, _dotnetPath, userProfileDir); + _sdkVersion = WorkloadOptionsExtensions.GetValidatedSdkVersion(parseResult.GetValueForOption(WorkloadRepairCommandParser.VersionOption), version, _dotnetPath, userProfileDir, true); var configOption = parseResult.GetValueForOption(WorkloadRepairCommandParser.ConfigOption); var sourceOption = parseResult.GetValueForOption(WorkloadRepairCommandParser.SourceOption); diff --git a/src/Cli/dotnet/commands/dotnet-workload/search/WorkloadSearchCommand.cs b/src/Cli/dotnet/commands/dotnet-workload/search/WorkloadSearchCommand.cs index 7ca9e88b011d..88fac779d565 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/search/WorkloadSearchCommand.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/search/WorkloadSearchCommand.cs @@ -32,7 +32,7 @@ public WorkloadSearchCommand( _workloadIdStub = result.GetValueForArgument(WorkloadSearchCommandParser.WorkloadIdStubArgument); var dotnetPath = Path.GetDirectoryName(Environment.ProcessPath); userProfileDir ??= CliFolderPathCalculator.DotnetUserProfileFolderPath; - _sdkVersion = WorkloadOptionsExtensions.GetValidatedSdkVersion(result.GetValueForOption(WorkloadSearchCommandParser.VersionOption), version, dotnetPath, userProfileDir); + _sdkVersion = WorkloadOptionsExtensions.GetValidatedSdkVersion(result.GetValueForOption(WorkloadSearchCommandParser.VersionOption), version, dotnetPath, userProfileDir, true); var workloadManifestProvider = new SdkDirectoryWorkloadManifestProvider(dotnetPath, _sdkVersion.ToString(), userProfileDir); _workloadResolver = workloadResolver ?? WorkloadResolver.Create(workloadManifestProvider, dotnetPath, _sdkVersion.ToString(), userProfileDir); } diff --git a/src/Cli/dotnet/commands/dotnet-workload/uninstall/WorkloadUninstallCommand.cs b/src/Cli/dotnet/commands/dotnet-workload/uninstall/WorkloadUninstallCommand.cs index e1c270eabfb0..6bb77c3baa54 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/uninstall/WorkloadUninstallCommand.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/uninstall/WorkloadUninstallCommand.cs @@ -41,7 +41,7 @@ public WorkloadUninstallCommand( .Select(workloadId => new WorkloadId(workloadId)).ToList().AsReadOnly(); var dotnetPath = dotnetDir ?? Path.GetDirectoryName(Environment.ProcessPath); userProfileDir = userProfileDir ?? CliFolderPathCalculator.DotnetUserProfileFolderPath; - _sdkVersion = WorkloadOptionsExtensions.GetValidatedSdkVersion(parseResult.GetValueForOption(WorkloadUninstallCommandParser.VersionOption), version, dotnetPath, userProfileDir); + _sdkVersion = WorkloadOptionsExtensions.GetValidatedSdkVersion(parseResult.GetValueForOption(WorkloadUninstallCommandParser.VersionOption), version, dotnetPath, userProfileDir, true); var workloadManifestProvider = new SdkDirectoryWorkloadManifestProvider(dotnetPath, _sdkVersion.ToString(), userProfileDir); workloadResolver ??= WorkloadResolver.Create(workloadManifestProvider, dotnetPath, _sdkVersion.ToString(), userProfileDir); diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/WorkloadUpdateCommand.cs b/src/Cli/dotnet/commands/dotnet-workload/update/WorkloadUpdateCommand.cs index 93d3768ba63c..8cc2e0955f18 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/update/WorkloadUpdateCommand.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/update/WorkloadUpdateCommand.cs @@ -40,10 +40,11 @@ public WorkloadUpdateCommand( string dotnetDir = null, string userProfileDir = null, string tempDirPath = null, - string version = null) + string version = null, + string installedFeatureBand = null) : base(parseResult, reporter: reporter, workloadResolver: workloadResolver, workloadInstaller: workloadInstaller, nugetPackageDownloader: nugetPackageDownloader, workloadManifestUpdater: workloadManifestUpdater, - dotnetDir: dotnetDir, userProfileDir: userProfileDir, tempDirPath: tempDirPath, version: version) + dotnetDir: dotnetDir, userProfileDir: userProfileDir, tempDirPath: tempDirPath, version: version, installedFeatureBand: installedFeatureBand) { _fromPreviousSdk = parseResult.GetValueForOption(WorkloadUpdateCommandParser.FromPreviousSdkOption); @@ -76,8 +77,7 @@ public override int Execute() } else if (_printDownloadLinkOnly) { - var packageUrls = GetUpdatablePackageUrlsAsync(_includePreviews).GetAwaiter().GetResult(); - + var packageUrls = GetUpdatablePackageUrlsAsync(_includePreviews).GetAwaiter().GetResult(); Reporter.WriteLine("==allPackageLinksJsonOutputStart=="); Reporter.WriteLine(JsonSerializer.Serialize(packageUrls, new JsonSerializerOptions() { WriteIndented = true })); Reporter.WriteLine("==allPackageLinksJsonOutputEnd=="); diff --git a/src/Tests/dotnet-workload-install.Tests/FailingNuGetPackageInstaller.cs b/src/Tests/dotnet-workload-install.Tests/FailingNuGetPackageInstaller.cs index b3995b21c743..98a846621e26 100644 --- a/src/Tests/dotnet-workload-install.Tests/FailingNuGetPackageInstaller.cs +++ b/src/Tests/dotnet-workload-install.Tests/FailingNuGetPackageInstaller.cs @@ -38,7 +38,7 @@ public Task> ExtractPackageAsync(string packagePath, Directo throw new Exception("Test Failure"); } - public Task GetLatestPackageVerion(PackageId packageId, PackageSourceLocation packageSourceLocation = null, bool includePreview = false) => throw new NotImplementedException(); + public Task GetLatestPackageVersion(PackageId packageId, PackageSourceLocation packageSourceLocation = null, bool includePreview = false) => throw new NotImplementedException(); public Task GetPackageUrl(PackageId packageId, NuGetVersion packageVersion, diff --git a/src/Tests/dotnet-workload-install.Tests/GivenDotnetWorkloadInstall.cs b/src/Tests/dotnet-workload-install.Tests/GivenDotnetWorkloadInstall.cs index a5d3573bf903..2e9696d7ff04 100644 --- a/src/Tests/dotnet-workload-install.Tests/GivenDotnetWorkloadInstall.cs +++ b/src/Tests/dotnet-workload-install.Tests/GivenDotnetWorkloadInstall.cs @@ -54,7 +54,7 @@ public void GivenWorkloadInstallItErrorsOnFakeWorkloadName() .HaveStdErrContaining(String.Format(Workloads.Workload.Install.LocalizableStrings.WorkloadNotRecognized, "fake")); } - [WindowsOnlyFact] + [Fact(Skip = "https://github.com/dotnet/sdk/issues/26624")] public void ItErrorUsingSkipManifestAndRollback() { var command = new DotnetCommand(Log); @@ -78,7 +78,7 @@ public void GivenWorkloadInstallItCanInstallPacks(bool userLocal, string sdkVers { var mockWorkloadIds = new WorkloadId[] { new WorkloadId("xamarin-android") }; var parseResult = Parser.Instance.Parse(new string[] { "dotnet", "workload", "install", "xamarin-android", "--skip-manifest-update" }); - (_, var installManager, var installer, _, _, _) = GetTestInstallers(parseResult, userLocal, sdkVersion); + (_, var installManager, var installer, _, _, _) = GetTestInstallers(parseResult, userLocal, sdkVersion, installedFeatureBand: sdkVersion); installManager.InstallWorkloads(mockWorkloadIds, true); @@ -98,7 +98,7 @@ public void GivenWorkloadInstallItCanRollBackPackInstallation(bool userLocal, st { var mockWorkloadIds = new WorkloadId[] { new WorkloadId("xamarin-android"), new WorkloadId("xamarin-android-build") }; var parseResult = Parser.Instance.Parse(new string[] { "dotnet", "workload", "install", "xamarin-android", "xamarin-android-build", "--skip-manifest-update" }); - (_, var installManager, var installer, var workloadResolver, _, _) = GetTestInstallers(parseResult, userLocal, sdkVersion, failingWorkload: "xamarin-android-build"); + (_, var installManager, var installer, var workloadResolver, _, _) = GetTestInstallers(parseResult, userLocal, sdkVersion, failingWorkload: "xamarin-android-build", installedFeatureBand: sdkVersion); var exceptionThrown = Assert.Throws(() => installManager.InstallWorkloads(mockWorkloadIds, true)); exceptionThrown.Message.Should().Be("Failing workload: xamarin-android-build"); @@ -120,7 +120,7 @@ public void GivenWorkloadInstallOnFailingRollbackItDisplaysTopLevelError() var installer = new MockPackWorkloadInstaller(failingWorkload: "xamarin-android-build", failingRollback: true); var workloadResolver = WorkloadResolver.CreateForTests(new MockManifestProvider(new[] { _manifestPath }), dotnetRoot); var parseResult = Parser.Instance.Parse(new string[] { "dotnet", "workload", "install", "xamarin-android", "xamarin-android-build", "--skip-manifest-update" }); - var installManager = new WorkloadInstallCommand(parseResult, reporter: _reporter, workloadResolver: workloadResolver, workloadInstaller: installer, version: "6.0.100"); + var installManager = new WorkloadInstallCommand(parseResult, reporter: _reporter, workloadResolver: workloadResolver, workloadInstaller: installer, version: "6.0.100", installedFeatureBand: "6.0.100"); var exceptionThrown = Assert.Throws(() => installManager.InstallWorkloads(mockWorkloadIds, true)); exceptionThrown.Message.Should().Be("Failing workload: xamarin-android-build"); @@ -135,7 +135,7 @@ public void GivenWorkloadInstallOnFailingRollbackItDisplaysTopLevelError() public void GivenWorkloadInstallItCanUpdateAdvertisingManifests(bool userLocal, string sdkVersion) { var parseResult = Parser.Instance.Parse(new string[] { "dotnet", "workload", "install", "xamarin-android" }); - (_, var installManager, var installer, _, var manifestUpdater, _) = GetTestInstallers(parseResult, userLocal, sdkVersion); + (_, var installManager, var installer, _, var manifestUpdater, _) = GetTestInstallers(parseResult, userLocal, sdkVersion, installedFeatureBand: sdkVersion); installManager.InstallWorkloads(new List(), false); // Don't actually do any installs, just update manifests @@ -154,7 +154,7 @@ public void GivenWorkloadInstallItWarnsOnGarbageCollectionFailure() var installer = new MockPackWorkloadInstaller(failingGarbageCollection: true); var workloadResolver = WorkloadResolver.CreateForTests(new MockManifestProvider(new[] { _manifestPath }), dotnetRoot); var parseResult = Parser.Instance.Parse(new string[] { "dotnet", "workload", "install", "xamarin-android", "xamarin-android-build", "--skip-manifest-update" }); - var installManager = new WorkloadInstallCommand(parseResult, reporter: _reporter, workloadResolver: workloadResolver, workloadInstaller: installer, version: "6.0.100"); + var installManager = new WorkloadInstallCommand(parseResult, reporter: _reporter, workloadResolver: workloadResolver, workloadInstaller: installer, version: "6.0.100", installedFeatureBand: "6.0.100"); installManager.InstallWorkloads(mockWorkloadIds, true); string.Join(" ", _reporter.Lines).Should().Contain("Failing garbage collection"); @@ -223,7 +223,7 @@ public void GivenWorkloadInstallItCanUpdateInstalledManifests(bool userLocal, st null), }; (_, var installManager, var installer, _, _, _) = - GetTestInstallers(parseResult, userLocal, sdkVersion, manifestUpdates: manifestsToUpdate); + GetTestInstallers(parseResult, userLocal, sdkVersion, manifestUpdates: manifestsToUpdate, installedFeatureBand: sdkVersion); installManager.InstallWorkloads(new List(), false); // Don't actually do any installs, just update manifests @@ -255,7 +255,7 @@ public void GivenWorkloadInstallFromCacheItInstallsCachedManifest(bool userLocal "dotnet", "workload", "install", "xamarin-android", "--from-cache", cachePath }); (_, var installManager, var installer, _, _, _) = GetTestInstallers(parseResult, userLocal, sdkVersion, - tempDirManifestPath: _manifestPath, manifestUpdates: manifestsToUpdate); + tempDirManifestPath: _manifestPath, manifestUpdates: manifestsToUpdate, installedFeatureBand: sdkVersion); installManager.Execute(); @@ -274,7 +274,7 @@ public void GivenWorkloadInstallItCanDownloadToOfflineCache(bool userLocal, stri { var cachePath = Path.Combine(_testAssetsManager.CreateTestDirectory(identifier: AppendForUserLocal("mockCache_", userLocal) + sdkVersion).Path, "mockCachePath"); var parseResult = Parser.Instance.Parse(new string[] { "dotnet", "workload", "install", "xamarin-android", "--download-to-cache", cachePath }); - (_, var installManager, var installer, _, var manifestUpdater, var packageDownloader) = GetTestInstallers(parseResult, userLocal, sdkVersion, tempDirManifestPath: _manifestPath); + (_, var installManager, var installer, _, var manifestUpdater, var packageDownloader) = GetTestInstallers(parseResult, userLocal, sdkVersion, tempDirManifestPath: _manifestPath, installedFeatureBand: sdkVersion); installManager.Execute(); @@ -298,7 +298,7 @@ public void GivenWorkloadInstallItCanInstallFromOfflineCache(bool userLocal, str var mockWorkloadIds = new WorkloadId[] { new WorkloadId("xamarin-android") }; var cachePath = "mockCachePath"; var parseResult = Parser.Instance.Parse(new string[] { "dotnet", "workload", "install", "xamarin-android", "--from-cache", cachePath }); - (_, var installManager, var installer, _, _, var nugetDownloader) = GetTestInstallers(parseResult, userLocal, sdkVersion); + (_, var installManager, var installer, _, _, var nugetDownloader) = GetTestInstallers(parseResult, userLocal, sdkVersion, installedFeatureBand: sdkVersion); installManager.Execute(); @@ -318,7 +318,7 @@ public void GivenWorkloadInstallItCanInstallFromOfflineCache(bool userLocal, str public void GivenWorkloadInstallItPrintsDownloadUrls(bool userLocal, string sdkVersion) { var parseResult = Parser.Instance.Parse(new string[] { "dotnet", "workload", "install", "xamarin-android", "--print-download-link-only" }); - (_, var installManager, _, _, _, _) = GetTestInstallers(parseResult, userLocal, sdkVersion, tempDirManifestPath: _manifestPath); + (_, var installManager, _, _, _, _) = GetTestInstallers(parseResult, userLocal, sdkVersion, tempDirManifestPath: _manifestPath, installedFeatureBand: sdkVersion); installManager.Execute(); @@ -341,7 +341,7 @@ public void GivenWorkloadInstallItErrorsOnUnsupportedPlatform() var parseResult = Parser.Instance.Parse(new string[] { "dotnet", "workload", "install", mockWorkloadId }); var exceptionThrown = Assert.Throws(() => new WorkloadInstallCommand(parseResult, reporter: _reporter, workloadResolver: workloadResolver, workloadInstaller: installer, - nugetPackageDownloader: nugetDownloader, workloadManifestUpdater: manifestUpdater, userProfileDir: testDirectory, dotnetDir: dotnetRoot, version: "6.0.100")); + nugetPackageDownloader: nugetDownloader, workloadManifestUpdater: manifestUpdater, userProfileDir: testDirectory, dotnetDir: dotnetRoot, version: "6.0.100", installedFeatureBand: "6.0.100")); exceptionThrown.Message.Should().Be(String.Format(Workloads.Workload.Install.LocalizableStrings.WorkloadNotSupportedOnPlatform, mockWorkloadId)); } @@ -370,13 +370,13 @@ public void GivenWorkloadInstallItDoesNotRemoveOldInstallsOnRollback(bool userLo // Successfully install a workload var installParseResult = Parser.Instance.Parse(new string[] { "dotnet", "workload", "install", existingWorkload }); var installCommand = new WorkloadInstallCommand(installParseResult, reporter: _reporter, workloadResolver: workloadResolver, nugetPackageDownloader: new MockNuGetPackageDownloader(tmpDir), - workloadManifestUpdater: manifestUpdater, userProfileDir: userProfileDir, version: sdkFeatureVersion, dotnetDir: dotnetRoot, tempDirPath: testDirectory); + workloadManifestUpdater: manifestUpdater, userProfileDir: userProfileDir, version: sdkFeatureVersion, dotnetDir: dotnetRoot, tempDirPath: testDirectory, installedFeatureBand: sdkFeatureVersion); installCommand.Execute(); // Install a workload with a mocked nuget failure installParseResult = Parser.Instance.Parse(new string[] { "dotnet", "workload", "install", installingWorkload }); installCommand = new WorkloadInstallCommand(installParseResult, reporter: _reporter, workloadResolver: workloadResolver, nugetPackageDownloader: nugetDownloader, - workloadManifestUpdater: manifestUpdater, userProfileDir: userProfileDir, version: sdkFeatureVersion, dotnetDir: dotnetRoot, tempDirPath: testDirectory); + workloadManifestUpdater: manifestUpdater, userProfileDir: userProfileDir, version: sdkFeatureVersion, dotnetDir: dotnetRoot, tempDirPath: testDirectory, installedFeatureBand: sdkFeatureVersion); var exceptionThrown = Assert.Throws(() => installCommand.Execute()); exceptionThrown.Message.Should().Contain("Test Failure"); @@ -411,12 +411,12 @@ public void GivenWorkloadInstallItTreatsPreviewsAsSeparateFeatureBands() // Install a workload for preview 7 var installParseResult = Parser.Instance.Parse(new string[] { "dotnet", "workload", "install", existingWorkload }); var installCommand = new WorkloadInstallCommand(installParseResult, reporter: _reporter, workloadResolver: workloadResolver, nugetPackageDownloader: new MockNuGetPackageDownloader(tmpDir), - workloadManifestUpdater: manifestUpdater, userProfileDir: userProfileDir, version: prev7SdkFeatureVersion, dotnetDir: dotnetRoot, tempDirPath: testDirectory); + workloadManifestUpdater: manifestUpdater, userProfileDir: userProfileDir, version: prev7SdkFeatureVersion, dotnetDir: dotnetRoot, tempDirPath: testDirectory, installedFeatureBand: prev7SdkFeatureVersion); installCommand.Execute(); // Install workload for RC1 installCommand = new WorkloadInstallCommand(installParseResult, reporter: _reporter, workloadResolver: workloadResolver, nugetPackageDownloader: new MockNuGetPackageDownloader(tmpDir), - workloadManifestUpdater: manifestUpdater, userProfileDir: userProfileDir, version: rc1SdkFeatureVersion, dotnetDir: dotnetRoot, tempDirPath: testDirectory); + workloadManifestUpdater: manifestUpdater, userProfileDir: userProfileDir, version: rc1SdkFeatureVersion, dotnetDir: dotnetRoot, tempDirPath: testDirectory, installedFeatureBand: rc1SdkFeatureVersion); installCommand.Execute(); // Existing installation is present @@ -450,7 +450,8 @@ public void GivenWorkloadInstallItTreatsPreviewsAsSeparateFeatureBands() [CallerMemberName] string testName = "", string failingWorkload = null, IEnumerable<(ManifestVersionUpdate manifestUpdate, Dictionary Workloads)> manifestUpdates = null, - string tempDirManifestPath = null) + string tempDirManifestPath = null, + string installedFeatureBand = null) { _reporter.Clear(); var testDirectory = _testAssetsManager.CreateTestDirectory(testName: testName, identifier: (userLocal ? "userlocal" : "default") + sdkVersion).Path; @@ -477,7 +478,8 @@ public void GivenWorkloadInstallItTreatsPreviewsAsSeparateFeatureBands() workloadManifestUpdater: manifestUpdater, userProfileDir: userProfileDir, dotnetDir: dotnetRoot, - version: sdkVersion); + version: sdkVersion, + installedFeatureBand: installedFeatureBand); return (testDirectory, installManager, installer, workloadResolver, manifestUpdater, nugetDownloader); } @@ -500,7 +502,7 @@ public void GivenWorkloadInstallItErrorsOnInvalidWorkloadRollbackFile() var installParseResult = Parser.Instance.Parse(new string[] { "dotnet", "workload", "install", workload, "--from-rollback-file", rollbackFilePath }); var installCommand = new WorkloadInstallCommand(installParseResult, reporter: _reporter, workloadResolver: workloadResolver, nugetPackageDownloader: new MockNuGetPackageDownloader(tmpDir), - userProfileDir: userProfileDir, version: sdkFeatureVersion, dotnetDir: dotnetRoot, tempDirPath: testDirectory); + userProfileDir: userProfileDir, version: sdkFeatureVersion, dotnetDir: dotnetRoot, tempDirPath: testDirectory, installedFeatureBand: "6.0.100"); Assert.Throws(() => installCommand.Execute()); string.Join(" ", _reporter.Lines).Should().Contain("Invalid rollback definition"); @@ -522,7 +524,7 @@ public void GivenWorkloadInstallItWarnsWhenTheWorkloadIsAlreadyInstalled() // Successfully install a workload var installParseResult = Parser.Instance.Parse(new string[] { "dotnet", "workload", "install", workloadId }); var installCommand = new WorkloadInstallCommand(installParseResult, reporter: _reporter, workloadResolver: workloadResolver, nugetPackageDownloader: new MockNuGetPackageDownloader(tmpDir), - workloadManifestUpdater: manifestUpdater, userProfileDir: userProfileDir, version: sdkFeatureVersion, dotnetDir: dotnetRoot, tempDirPath: testDirectory); + workloadManifestUpdater: manifestUpdater, userProfileDir: userProfileDir, version: sdkFeatureVersion, dotnetDir: dotnetRoot, tempDirPath: testDirectory, installedFeatureBand: "6.0.100"); installCommand.Execute() .Should().Be(0); _reporter.Clear(); @@ -530,7 +532,7 @@ public void GivenWorkloadInstallItWarnsWhenTheWorkloadIsAlreadyInstalled() // Install again, this time it should tell you that you already have the workload installed installParseResult = Parser.Instance.Parse(new string[] { "dotnet", "workload", "install", workloadId, "mock-2" }); installCommand = new WorkloadInstallCommand(installParseResult, reporter: _reporter, workloadResolver: workloadResolver, nugetPackageDownloader: new MockNuGetPackageDownloader(tmpDir), - workloadManifestUpdater: manifestUpdater, userProfileDir: userProfileDir, version: sdkFeatureVersion, dotnetDir: dotnetRoot, tempDirPath: testDirectory); + workloadManifestUpdater: manifestUpdater, userProfileDir: userProfileDir, version: sdkFeatureVersion, dotnetDir: dotnetRoot, tempDirPath: testDirectory, installedFeatureBand: "6.0.100"); installCommand.Execute() .Should().Be(0); diff --git a/src/Tests/dotnet-workload-install.Tests/GivenWorkloadManifestUpdater.cs b/src/Tests/dotnet-workload-install.Tests/GivenWorkloadManifestUpdater.cs index 4851d518a259..e99c2af0b4fa 100644 --- a/src/Tests/dotnet-workload-install.Tests/GivenWorkloadManifestUpdater.cs +++ b/src/Tests/dotnet-workload-install.Tests/GivenWorkloadManifestUpdater.cs @@ -674,8 +674,6 @@ public void TestSideBySideUpdateChecks() File.GetLastAccessTime(sentinelPath2).Should().BeCloseTo(updateTime2); } - - private List<(PackageId, NuGetVersion, DirectoryPath?, PackageSourceLocation)> GetExpectedDownloadedPackages(string sdkFeatureBand = "6.0.100") { var expectedDownloadedPackages = _installedManifests diff --git a/src/Tests/dotnet-workload-install.Tests/MockNuGetPackageInstaller.cs b/src/Tests/dotnet-workload-install.Tests/MockNuGetPackageInstaller.cs index a2d9bb8692f2..2129535e4e6c 100644 --- a/src/Tests/dotnet-workload-install.Tests/MockNuGetPackageInstaller.cs +++ b/src/Tests/dotnet-workload-install.Tests/MockNuGetPackageInstaller.cs @@ -80,7 +80,7 @@ public Task> ExtractPackageAsync(string packagePath, Directo return Task.FromResult(new List() as IEnumerable); } - public Task GetLatestPackageVerion(PackageId packageId, PackageSourceLocation packageSourceLocation = null, bool includePreview = false) + public Task GetLatestPackageVersion(PackageId packageId, PackageSourceLocation packageSourceLocation = null, bool includePreview = false) { return Task.FromResult(new NuGetVersion("10.0.0")); } diff --git a/src/Tests/dotnet-workload-repair.Tests/GivenDotnetWorkloadRepair.cs b/src/Tests/dotnet-workload-repair.Tests/GivenDotnetWorkloadRepair.cs index 381a26d6ae62..4780c048478f 100644 --- a/src/Tests/dotnet-workload-repair.Tests/GivenDotnetWorkloadRepair.cs +++ b/src/Tests/dotnet-workload-repair.Tests/GivenDotnetWorkloadRepair.cs @@ -82,7 +82,7 @@ public void GivenExtraPacksInstalledRepairGarbageCollects(bool userLocal) // Install a workload var installParseResult = Parser.Instance.Parse(new string[] { "dotnet", "workload", "install", installingWorkload }); var installCommand = new WorkloadInstallCommand(installParseResult, reporter: _reporter, workloadResolver: workloadResolver, nugetPackageDownloader: nugetDownloader, - workloadManifestUpdater: manifestUpdater, userProfileDir: userProfileDir, version: sdkFeatureVersion, dotnetDir: dotnetRoot, tempDirPath: testDirectory); + workloadManifestUpdater: manifestUpdater, userProfileDir: userProfileDir, version: sdkFeatureVersion, dotnetDir: dotnetRoot, tempDirPath: testDirectory, installedFeatureBand: sdkFeatureVersion); installCommand.Execute(); // Add extra pack dirs and records @@ -129,7 +129,7 @@ public void GivenMissingPacksRepairFixesInstall(bool userLocal) // Install a workload var installParseResult = Parser.Instance.Parse(new string[] { "dotnet", "workload", "install", installingWorkload }); var installCommand = new WorkloadInstallCommand(installParseResult, reporter: _reporter, workloadResolver: workloadResolver, nugetPackageDownloader: nugetDownloader, - workloadManifestUpdater: manifestUpdater, userProfileDir: userProfileDir, version: sdkFeatureVersion, dotnetDir: dotnetRoot, tempDirPath: testDirectory); + workloadManifestUpdater: manifestUpdater, userProfileDir: userProfileDir, version: sdkFeatureVersion, dotnetDir: dotnetRoot, tempDirPath: testDirectory, installedFeatureBand: sdkFeatureVersion); installCommand.Execute(); // Delete pack dirs/ records diff --git a/src/Tests/dotnet-workload-uninstall.Tests/GivenDotnetWorkloadUninstall.cs b/src/Tests/dotnet-workload-uninstall.Tests/GivenDotnetWorkloadUninstall.cs index b4fbe4ab059a..ddc5fbd76f5b 100644 --- a/src/Tests/dotnet-workload-uninstall.Tests/GivenDotnetWorkloadUninstall.cs +++ b/src/Tests/dotnet-workload-uninstall.Tests/GivenDotnetWorkloadUninstall.cs @@ -181,7 +181,7 @@ private void InstallWorkload(string installingWorkload, string testDirectory, st var manifestUpdater = new MockWorkloadManifestUpdater(); var installParseResult = Parser.Instance.Parse(new string[] { "dotnet", "workload", "install", installingWorkload }); var installCommand = new WorkloadInstallCommand(installParseResult, reporter: _reporter, workloadResolver: workloadResolver, nugetPackageDownloader: nugetDownloader, - workloadManifestUpdater: manifestUpdater, userProfileDir: userProfileDir, version: sdkFeatureVersion, dotnetDir: dotnetRoot, tempDirPath: testDirectory); + workloadManifestUpdater: manifestUpdater, userProfileDir: userProfileDir, version: sdkFeatureVersion, dotnetDir: dotnetRoot, tempDirPath: testDirectory, installedFeatureBand: sdkFeatureVersion); installCommand.Execute(); } diff --git a/src/Tests/dotnet-workload-update.Tests/GivenDotnetWorkloadUpdate.cs b/src/Tests/dotnet-workload-update.Tests/GivenDotnetWorkloadUpdate.cs index c5ccd9d2941d..26995b86e855 100644 --- a/src/Tests/dotnet-workload-update.Tests/GivenDotnetWorkloadUpdate.cs +++ b/src/Tests/dotnet-workload-update.Tests/GivenDotnetWorkloadUpdate.cs @@ -63,7 +63,7 @@ public void GivenWorkloadUpdateItRemovesOldPacksAfterInstall(bool userLocal) // Install a workload var installParseResult = Parser.Instance.Parse(new string[] { "dotnet", "workload", "install", installingWorkload }); var installCommand = new WorkloadInstallCommand(installParseResult, reporter: _reporter, workloadResolver: workloadResolver, nugetPackageDownloader: nugetDownloader, - workloadManifestUpdater: manifestUpdater, userProfileDir: userProfileDir, version: sdkFeatureVersion, dotnetDir: dotnetRoot, tempDirPath: testDirectory); + workloadManifestUpdater: manifestUpdater, userProfileDir: userProfileDir, version: sdkFeatureVersion, dotnetDir: dotnetRoot, tempDirPath: testDirectory, installedFeatureBand: sdkFeatureVersion); installCommand.Execute(); // 7 packs in packs dir, 1 template pack @@ -97,7 +97,7 @@ public void GivenWorkloadUpdateItRemovesOldPacksAfterInstall(bool userLocal) // Update workload var updateParseResult = Parser.Instance.Parse(new string[] { "dotnet", "workload", "update" }); var updateCommand = new WorkloadUpdateCommand(updateParseResult, reporter: _reporter, workloadResolver: workloadResolver, nugetPackageDownloader: nugetDownloader, - workloadManifestUpdater: manifestUpdater, userProfileDir: userProfileDir, version: sdkFeatureVersion, dotnetDir: dotnetRoot, tempDirPath: testDirectory); + workloadManifestUpdater: manifestUpdater, userProfileDir: userProfileDir, version: sdkFeatureVersion, dotnetDir: dotnetRoot, tempDirPath: testDirectory, installedFeatureBand: sdkFeatureVersion); updateCommand.Execute(); // 6 packs in packs dir, 1 template pack @@ -166,7 +166,7 @@ public void GivenWorkloadUpdateAcrossFeatureBandsItUpdatesPacks(bool userLocal) // Update workload (without installing any workloads to this feature band) var updateParseResult = Parser.Instance.Parse(new string[] { "dotnet", "workload", "update", "--from-previous-sdk" }); var updateCommand = new WorkloadUpdateCommand(updateParseResult, reporter: _reporter, workloadResolver: workloadResolver, nugetPackageDownloader: nugetDownloader, - workloadManifestUpdater: manifestUpdater, userProfileDir: userProfileDir, version: sdkFeatureVersion, dotnetDir: dotnetRoot, tempDirPath: testDirectory); + workloadManifestUpdater: manifestUpdater, userProfileDir: userProfileDir, version: sdkFeatureVersion, dotnetDir: dotnetRoot, tempDirPath: testDirectory, installedFeatureBand: sdkFeatureVersion); updateCommand.Execute(); foreach (var pack in workloadPacks) @@ -187,7 +187,7 @@ public void GivenWorkloadUpdateAcrossFeatureBandsItUpdatesPacks(bool userLocal) public void GivenWorkloadUpdateItUpdatesOutOfDatePacks() { var mockWorkloadIds = new WorkloadId[] { new WorkloadId("xamarin-android") }; - (_, var command, var installer, _, _, _) = GetTestInstallers(_parseResult, installedWorkloads: mockWorkloadIds); + (_, var command, var installer, _, _, _) = GetTestInstallers(_parseResult, installedWorkloads: mockWorkloadIds, installedFeatureBand: "6.0.100"); command.Execute(); @@ -201,7 +201,8 @@ public void GivenWorkloadUpdateItUpdatesOutOfDatePacks() public void GivenWorkloadUpdateItRollsBackOnFailedUpdate() { var mockWorkloadIds = new WorkloadId[] { new WorkloadId("xamarin-android"), new WorkloadId("xamarin-android-build") }; - (_, var command, var installer, var workloadResolver, _, _) = GetTestInstallers(_parseResult, installedWorkloads: mockWorkloadIds, failingPack: "Xamarin.Android.Framework"); + (_, var command, var installer, var workloadResolver, _, _) = GetTestInstallers(_parseResult, installedWorkloads: mockWorkloadIds, failingPack: "Xamarin.Android.Framework", installedFeatureBand: "6.0.100"); + var exceptionThrown = Assert.Throws(() => command.Execute()); exceptionThrown.Message.Should().Contain("Failing pack: Xamarin.Android.Framework"); @@ -220,7 +221,7 @@ public void GivenWorkloadUpdateItCanDownloadToOfflineCache() var mockWorkloadIds = new WorkloadId[] { new WorkloadId("xamarin-android") }; var cachePath = Path.Combine(_testAssetsManager.CreateTestDirectory(identifier: "cachePath").Path, "mockCachePath"); var parseResult = Parser.Instance.Parse(new string[] { "dotnet", "workload", "update", "--download-to-cache", cachePath }); - (_, var command, var installer, _, var manifestUpdater, var packageDownloader) = GetTestInstallers(parseResult, installedWorkloads: mockWorkloadIds, includeInstalledPacks: true); + (_, var command, var installer, _, var manifestUpdater, var packageDownloader) = GetTestInstallers(parseResult, installedWorkloads: mockWorkloadIds, includeInstalledPacks: true, installedFeatureBand: "6.0.100"); command.Execute(); @@ -241,7 +242,7 @@ public void GivenWorkloadUpdateItCanInstallFromOfflineCache() var mockWorkloadIds = new WorkloadId[] { new WorkloadId("xamarin-android") }; var cachePath = "mockCachePath"; var parseResult = Parser.Instance.Parse(new string[] { "dotnet", "workload", "update", "--from-cache", cachePath }); - (_, var command, var installer, _, _, var nugetDownloader) = GetTestInstallers(parseResult, installedWorkloads: mockWorkloadIds); + (_, var command, var installer, _, _, var nugetDownloader) = GetTestInstallers(parseResult, installedWorkloads: mockWorkloadIds, installedFeatureBand: "6.0.100"); command.Execute(); @@ -257,7 +258,7 @@ public void GivenWorkloadUpdateItPrintsDownloadUrls() { var mockWorkloadIds = new WorkloadId[] { new WorkloadId("xamarin-android") }; var parseResult = Parser.Instance.Parse(new string[] { "dotnet", "workload", "update", "--print-download-link-only" }); - (_, var command, _, _, _, _) = GetTestInstallers(parseResult, installedWorkloads: mockWorkloadIds, includeInstalledPacks: true); + (_, var command, _, _, _, _) = GetTestInstallers(parseResult, installedWorkloads: mockWorkloadIds, includeInstalledPacks: true, installedFeatureBand: "6.0.100"); command.Execute(); @@ -283,7 +284,7 @@ public void GivenWorkloadUpdateAcrossFeatureBandsItErrorsWhenManifestsDoNotExist WorkloadFileBasedInstall.SetUserLocal(dotnetRoot, sdkFeatureVersion); } - var exceptionThrown = Assert.Throws(() => new WorkloadUpdateCommand(updateParseResult, reporter: _reporter, dotnetDir: dotnetRoot, userProfileDir: userProfileDir)); + var exceptionThrown = Assert.Throws(() => new WorkloadUpdateCommand(updateParseResult, reporter: _reporter, dotnetDir: dotnetRoot, userProfileDir: userProfileDir, installedFeatureBand: "6.0.400")); exceptionThrown.Message.Should().Contain("No manifests exist"); } @@ -316,7 +317,7 @@ public void GivenWorkloadUpdateAcrossFeatureBandsItErrorsWhenUnableToReadManifes } "); - var exceptionThrown = Assert.Throws(() => new WorkloadUpdateCommand(updateParseResult, reporter: _reporter, dotnetDir: dotnetRoot, userProfileDir: userProfileDir)); + var exceptionThrown = Assert.Throws(() => new WorkloadUpdateCommand(updateParseResult, reporter: _reporter, dotnetDir: dotnetRoot, userProfileDir: userProfileDir, installedFeatureBand: sdkFeatureVersion)); exceptionThrown.Message.Should().Contain(string.Format(Workloads.Workload.Install.LocalizableStrings.IncompatibleManifests, "7.0.100")); } @@ -324,7 +325,7 @@ public void GivenWorkloadUpdateAcrossFeatureBandsItErrorsWhenUnableToReadManifes public void GivenOnlyUpdateAdManifestItSucceeds() { var parseResult = Parser.Instance.Parse(new string[] { "dotnet", "workload", "update", "--advertising-manifests-only" }); - (_, var command, _, _, var manifestUpdater, _) = GetTestInstallers(parseResult); + (_, var command, _, _, var manifestUpdater, _) = GetTestInstallers(parseResult, installedFeatureBand: "6.0.100"); command.Execute(); manifestUpdater.UpdateAdvertisingManifestsCallCount.Should().Be(1); @@ -334,7 +335,8 @@ public void GivenOnlyUpdateAdManifestItSucceeds() public void GivenPrintRollbackDefinitionItIncludesAllInstalledManifests() { var parseResult = Parser.Instance.Parse(new string[] { "dotnet", "workload", "update", "--print-rollback" }); - (_, var updateCommand, _, _, _, _) = GetTestInstallers(parseResult); + (_, var updateCommand, _, _, _, _) = GetTestInstallers(parseResult, installedFeatureBand: "6.0.100"); + updateCommand.Execute(); _reporter.Lines.Count().Should().Be(3); @@ -361,7 +363,7 @@ public void ApplyRollbackAcrossFeatureBand(string existingSdkFeatureBand, string null), }; - (_, var updateCommand, var packInstaller, var workloadResolver, var workloadManifestUpdater, var nuGetPackageDownloader) = GetTestInstallers(parseResult, manifestUpdates: manifestsToUpdate, sdkVersion: "6.0.300", identifier: existingSdkFeatureBand + newSdkFeatureBand); + (_, var updateCommand, var packInstaller, var workloadResolver, var workloadManifestUpdater, var nuGetPackageDownloader) = GetTestInstallers(parseResult, manifestUpdates: manifestsToUpdate, sdkVersion: "6.0.300", identifier: existingSdkFeatureBand + newSdkFeatureBand, installedFeatureBand: existingSdkFeatureBand); updateCommand.UpdateWorkloads(); @@ -390,7 +392,7 @@ public void ApplyRollbackWithMultipleManifestsAcrossFeatureBand() null), }; - (_, var updateCommand, var packInstaller, var workloadResolver, var workloadManifestUpdater, var nuGetPackageDownloader) = GetTestInstallers(parseResult, manifestUpdates: manifestsToUpdate, sdkVersion: "6.0.300"); + (_, var updateCommand, var packInstaller, var workloadResolver, var workloadManifestUpdater, var nuGetPackageDownloader) = GetTestInstallers(parseResult, manifestUpdates: manifestsToUpdate, sdkVersion: "6.0.300", installedFeatureBand: "6.0.300"); updateCommand.UpdateWorkloads(); @@ -423,7 +425,7 @@ public void GivenInvalidVersionInRollbackFileItErrors() var updateParseResult = Parser.Instance.Parse(new string[] { "dotnet", "workload", "update", "--from-rollback-file", rollbackFilePath }); - var updateCommand = new WorkloadUpdateCommand(updateParseResult, reporter: _reporter, userProfileDir: userProfileDir, dotnetDir: dotnetRoot, version: sdkFeatureVersion, tempDirPath: testDirectory); + var updateCommand = new WorkloadUpdateCommand(updateParseResult, reporter: _reporter, userProfileDir: userProfileDir, dotnetDir: dotnetRoot, version: sdkFeatureVersion, tempDirPath: testDirectory, installedFeatureBand: sdkFeatureVersion); var exception = Assert.Throws(() => updateCommand.Execute()); exception.InnerException.Should().BeOfType(); @@ -439,7 +441,8 @@ public void GivenInvalidVersionInRollbackFileItErrors() IList installedWorkloads = null, bool includeInstalledPacks = false, string sdkVersion = "6.0.100", - string identifier = null) + string identifier = null, + string installedFeatureBand = null) { _reporter.Clear(); var testDirectory = _testAssetsManager.CreateTestDirectory(testName: testName, identifier).Path; @@ -464,7 +467,8 @@ public void GivenInvalidVersionInRollbackFileItErrors() workloadManifestUpdater: manifestUpdater, dotnetDir: dotnetRoot, userProfileDir: testDirectory, - version: sdkVersion); + version: sdkVersion, + installedFeatureBand: installedFeatureBand); return (testDirectory, installManager, installer, workloadResolver, manifestUpdater, nugetDownloader); }