{"record":{"id":"ddb42f544ea1b5e7","repo":"stride3d/stride","slug":"could-not-start-install-package-process-packageinstall-with","errorCode":null,"errorMessage":"Could not start install package process [{packageInstall}] with options {arguments}","messagePattern":"Could not start install package process \\[(.+?)\\] with options (.+?)","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"sources/assets/Stride.Core.Packages/NugetStore.cs","lineNumber":1056,"sourceCode":"            foreach (var file in Directory.EnumerateFiles(httpCache, fileName, SearchOption.AllDirectories))\n            {\n                try { File.Delete(file); } catch { /* in use / permission; skip */ }\n            }\n        }\n        catch { /* best-effort */ }\n    }\n\n    private static void RunPackageInstall(string packageInstall, string arguments, ProgressReport progress)\n    {\n        // Run packageinstall.exe\n        using var process = Process.Start(new ProcessStartInfo(packageInstall, arguments)\n        {\n            UseShellExecute = false,\n            CreateNoWindow = true,\n            RedirectStandardError = true,\n            RedirectStandardOutput = true,\n            WorkingDirectory = Path.GetDirectoryName(packageInstall),\n        }) ?? throw new InvalidOperationException($\"Could not start install package process [{packageInstall}] with options {arguments}\");\n        var errorOutput = new StringBuilder();\n\n        process.OutputDataReceived += (_, args) =>\n        {\n            if (!string.IsNullOrEmpty(args.Data))\n            {\n                var matches = powerShellProgressRegex.Match(args.Data);\n                if (matches.Success && int.TryParse(matches.Groups[1].Value, out var percentageResult))\n                {\n                    // Report progress\n                    progress?.UpdateProgress(ProgressAction.Install, percentageResult);\n                }\n                else\n                {\n                    lock (process)\n                    {\n                        errorOutput.AppendLine(args.Data);\n                    }","sourceCodeStart":1038,"sourceCodeEnd":1074,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/assets/Stride.Core.Packages/NugetStore.cs#L1038-L1074","documentation":"NugetStore launches an external installer executable (packageInstall) via Process.Start with hidden-window, redirected-output options, and throws this InvalidOperationException when Process.Start returns null — meaning the OS could not spawn the process at all.","triggerScenarios":"Calling the install flow that spawns the package installer when Process.Start fails to create the process, e.g. the executable path does not exist or cannot be executed.","commonSituations":"Installer binary deleted by antivirus or a failed download; missing/blocked executable (no execute permission on Linux, blocked file on Windows); wrong working directory so a relative path no longer resolves.","solutions":["Check the file at packageInstall exists and is an executable before calling the install API","Re-download/reinstall the package so the installer binary is intact","Unblock the executable (Windows 'Unblock' / antivirus quarantine; chmod +x on Linux)","Run the process with adequate permissions; ensure WorkingDirectory exists"],"exampleFix":"// before\nawait store.Install(package);\n// after\nvar exePath = Path.Combine(store.PackagesPath, package.Id, expectedInstallerName);\nif (!File.Exists(exePath))\n    throw new FileNotFoundException(\"Installer executable missing\", exePath);\nawait store.Install(package);","handlingStrategy":"validation","validationCode":"if (!File.Exists(installerPath))\n    throw new FileNotFoundException(\"Package installer executable missing\", installerPath);","typeGuard":"bool IsExecutableFile(string path) => File.Exists(path) && (new FileInfo(path).Attributes & FileAttributes.Directory) == 0;","tryCatchPattern":"try { await store.Install(package); }\ncatch (InvalidOperationException ex) when (ex.Message.Contains(\"Could not start install package process\"))\n{\n    // check antivirus/quarantine, reinstall package\n}","preventionTips":["Verify installer binaries exist after downloads","Whitelist package cache folders in antivirus software","Run installers from an intact, unblocked package store"],"tags":["process","nuget","installer","windows"],"backgroundTag":"file-not-found","analyzedSha":"96fad776d210c221682aac1ccdf4c79dc046fc38","analyzedAt":"2026-09-14T02:59:31.279Z","contentChangedAt":"2026-09-14T02:59:31.279Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}