diff --git a/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs b/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs
index c266ba56be2f..bd81bf0be606 100644
--- a/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs
+++ b/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs
@@ -123,6 +123,13 @@ protected bool TryHandleWorkloadUpdateFromVersion(ITransactionContext context, D
_workloadInstaller.UpdateInstallMode(_sdkFeatureBand, true);
}
+ // Delete the current advertising manifest because if we fail to find the right workload version, we want to fail.
+ var advertisingPackagePath = Path.Combine(_userProfileDir, "sdk-advertising", _sdkFeatureBand.ToString(), "microsoft.net.workloads");
+ if (Directory.Exists(advertisingPackagePath))
+ {
+ Directory.Delete(advertisingPackagePath, recursive: true);
+ }
+
_workloadManifestUpdater.DownloadWorkloadSet(_workloadSetVersionFromGlobalJson ?? _workloadSetVersion, offlineCache);
return TryInstallWorkloadSet(context, out updates, throwOnFailure: true);
}
diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/LocalizableStrings.resx b/src/Cli/dotnet/commands/dotnet-workload/update/LocalizableStrings.resx
index 5aff919c0705..261628f9a0fc 100644
--- a/src/Cli/dotnet/commands/dotnet-workload/update/LocalizableStrings.resx
+++ b/src/Cli/dotnet/commands/dotnet-workload/update/LocalizableStrings.resx
@@ -160,6 +160,6 @@
No workload update found.
- Workload version {0} not found.
+ Workload version {0} not found. Adding a feed that contains it to your NuGet.config may help.
diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.cs.xlf b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.cs.xlf
index 4228a8117c0a..42786306f30d 100644
--- a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.cs.xlf
+++ b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.cs.xlf
@@ -73,8 +73,8 @@
- Workload version {0} not found.
- Verze úlohy {0} nebyla nalezena.
+ Workload version {0} not found. Adding a feed that contains it to your NuGet.config may help.
+ Verze úlohy {0} nebyla nalezena.