{"record":{"id":"7fc72a5c5d651e5e","repo":"Orbmu2k/nvidiaProfileInspector","slug":"the-selected-release-does-not-contain-a-downloadable-update-7fc72a","errorCode":null,"errorMessage":"The selected release does not contain a downloadable update package.","messagePattern":"The selected release does not contain a downloadable update package\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"nvidiaProfileInspector/Common/Updates/InplaceUpdateInstaller.cs","lineNumber":20,"sourceCode":"using System.Diagnostics;\nusing System.IO;\nusing System.IO.Compression;\nusing System.Linq;\nusing System.Net.Http;\nusing System.Reflection;\nusing System.Threading.Tasks;\n\nnamespace nvidiaProfileInspector.Common.Updates\n{\n    public sealed class InplaceUpdateInstaller : IUpdateInstaller\n    {\n        public async Task PrepareAndRunAsync(UpdateRelease release)\n        {\n            if (release == null)\n                throw new InvalidOperationException(\"No update release was selected.\");\n\n            if (!release.IsInstallable)\n                throw new InvalidOperationException(\"The selected release does not contain a downloadable update package.\");\n\n            var tempRoot = Path.Combine(Path.GetTempPath(), \"nvidiaProfileInspector-update-\" + Guid.NewGuid().ToString(\"N\"));\n            Directory.CreateDirectory(tempRoot);\n\n            var assetPath = Path.Combine(tempRoot, SanitizeFileName(release.Asset.Name ?? \"update.zip\"));\n            await DownloadFileAsync(release.Asset.DownloadUrl, assetPath);\n\n            var sourcePath = PrepareUpdateSource(tempRoot, assetPath, release.Asset.PackageType);\n            var appDirectory = AppContext.BaseDirectory.TrimEnd(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);\n            var executablePath = Assembly.GetEntryAssembly()?.Location ?? Process.GetCurrentProcess().MainModule.FileName;\n            var scriptPath = Path.Combine(tempRoot, \"apply-update.cmd\");\n\n            File.WriteAllText(scriptPath, CreateUpdateScript(Process.GetCurrentProcess().Id, tempRoot, sourcePath, appDirectory, executablePath));\n\n            Process.Start(new ProcessStartInfo\n            {\n                FileName = scriptPath,\n                UseShellExecute = true,","sourceCodeStart":2,"sourceCodeEnd":38,"githubUrl":"https://github.com/Orbmu2k/nvidiaProfileInspector/blob/2f50c388b3a4d661cade66b32746bec096d1eee1/nvidiaProfileInspector/Common/Updates/InplaceUpdateInstaller.cs#L2-L38","documentation":"InvalidOperationException thrown by InplaceUpdateInstaller.PrepareAndRunAsync when the release is non-null but IsInstallable is false — the release lacks a downloadable asset (DownloadUrl/Asset) so the in-place updater has nothing to download. Same condition as the AppUpdateService-level check, repeated defensively inside the installer.","triggerScenarios":"Calling the installer directly, bypassing AppUpdateService's pre-check, with a release that has no asset; a release whose assets were stripped (source-only); IsInstallable false because asset name/URL failed parsing; race where the asset list changed between check and install.","commonSituations":"Updating from a release where CI didn't upload the zip; manually constructing an UpdateRelease without an Asset; testing the installer against a draft release.","solutions":["Verify release.IsInstallable before invoking the installer (both at UI and service level)","Only list releases with attached binary assets as updatable","Catch and map to a user-facing 'this release has no installable package' message","Re-fetch the release metadata; the asset may now be attached"],"exampleFix":"// before\nawait installer.PrepareAndRunAsync(release);\n// after\nif (!release.IsInstallable) { ShowMessage(\"No downloadable package for this release.\"); return; }\nawait installer.PrepareAndRunAsync(release);","handlingStrategy":"validation","validationCode":"if (release is null) throw new InvalidOperationException(\"No release selected\");\nif (!release.IsInstallable) throw new InvalidOperationException(\"Release has no downloadable package\");","typeGuard":"bool IsInstallableRelease(UpdateRelease release) => release is not null && release.IsInstallable && !string.IsNullOrEmpty(release.Asset?.DownloadUrl);","tryCatchPattern":"try { await installer.PrepareAndRunAsync(release); }\ncatch (InvalidOperationException) { MessageBox.Show(\"No downloadable update package for this release.\"); }","preventionTips":["Check IsInstallable before any install path, including direct installer calls","Verify Asset and DownloadUrl are non-empty before offering the update","Filter update lists to releases with binary assets","Re-fetch release data if assets may have been attached after caching"],"tags":["update","validation","invalid-operation"],"backgroundTag":"missing-required-config-field","analyzedSha":"2f50c388b3a4d661cade66b32746bec096d1eee1","analyzedAt":"2026-09-15T05:23:52.218Z","contentChangedAt":"2026-09-15T05:23:52.218Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}