Allow dotnetup to handle when a release has no archives but has sys installers#54910
Conversation
…tem installers Resolves dotnet#54627 Adds a specific 'user' error for when a release has no archives but does exist.
There was a problem hiding this comment.
Pull request overview
This PR improves dotnetup’s handling of releases that exist in the release manifest but do not provide a user-installable archive (.tar.gz / .zip), such as WindowsDesktop runtime releases that ship only .exe installers for a given RID. It introduces a distinct error code and status to classify this scenario as user-actionable rather than a “missing platform file” product failure.
Changes:
- Add
FindReleaseFileStatus.NoUserInstallableArtifactandDotnetInstallErrorCode.NoUserInstallableArtifactto distinguish “RID has artifacts but no installable archive”. - Update archive resolution + downloader error mapping to surface the new user-facing error.
- Add/extend tests to validate classification and end-to-end behavior (including “no HTTP download attempted” in this failure mode).
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| test/dotnetup.Tests/ReleaseManifestFilterTests.cs | Adds unit coverage for the new “no user-installable archive” classification path. |
| test/dotnetup.Tests/DotnetArchiveDownloaderBlobFeedTests.cs | Adds regression + end-to-end tests ensuring the new status maps to the new error code and fails before any download. |
| src/Installer/Microsoft.Dotnet.Installation/Strings.resx | Adds a new localized-ish resource string for the new user-facing error message. |
| src/Installer/Microsoft.Dotnet.Installation/Internal/ReleaseManifest.cs | Introduces archive selection/classification that distinguishes “no files” vs “files but no installable archive”. |
| src/Installer/Microsoft.Dotnet.Installation/Internal/DotnetArchiveDownloader.cs | Maps the new manifest status to the new install error code/message. |
| src/Installer/Microsoft.Dotnet.Installation/DotnetInstallException.cs | Adds the new DotnetInstallErrorCode value for downstream classification/telemetry. |
| src/Installer/dotnetup.Library/Telemetry/ErrorCategoryClassifier.cs | Classifies NoUserInstallableArtifact as a user error for telemetry quality metrics. |
dsplaisted
left a comment
There was a problem hiding this comment.
It looks like this improves the error messaging, but what's the behavior when this happens when you're trying to migrate installs (especially when doing the init walkthrough). Will this fail the whole command / setup? It seems like this should probably be at most a warning in that case.
Also, what versions will this potentially happen with? Is it just older versions of the WindowsDesktop shared framework, or could it happen with more current versions?
I actually hit this because I had this version installed and it tried to convert it. How it works is that it reports the conversion that failed and it returns 0 but everything else in the setup continues. But before it was a generic error about how that version may not exist, and now it presents the correct information. It's older versions specifically of windows desktop, we weren't producing the archives at this time though that should not occur in the future. |

Resolves #54627
Adds a specific 'user' error for when a release has no archives but does exist.