{"record":{"id":"17e5a2d78b600200","repo":"LykosAI/StabilityMatrix","slug":"dotnet8-with-args-args-failed-with-exit-code-process","errorCode":null,"errorMessage":"dotnet8 with args [{args}] failed with exit code {process.ExitCode}:\n{process.StandardOutput}\n{process.StandardError}","messagePattern":"dotnet8 with args \\[(.+?)\\] failed with exit code (.+?):\n(.+?)\n(.+?)","errorType":"exception","errorClass":"ProcessException","httpStatus":null,"severity":"error","filePath":"StabilityMatrix.Avalonia/Helpers/UnixPrerequisiteHelper.cs","lineNumber":511,"sourceCode":"        );\n\n        if (!waitForExit)\n            return process;\n\n        await process.WaitForExitAsync();\n\n        if (process.ExitCode == 0)\n            return process;\n\n        Logger.Error(\n            \"dotnet8 with args [{Args}] failed with exit code \" + \"{ExitCode}:\\n{StdOut}\\n{StdErr}\",\n            args,\n            process.ExitCode,\n            process.StandardOutput,\n            process.StandardError\n        );\n\n        throw new ProcessException(\n            $\"dotnet8 with args [{args}] failed with exit code\"\n                + $\" {process.ExitCode}:\\n{process.StandardOutput}\\n{process.StandardError}\"\n        );\n    }\n\n    [SupportedOSPlatform(\"Linux\")]\n    [SupportedOSPlatform(\"macOS\")]\n    public async Task InstallNodeIfNecessary(IProgress<ProgressReport>? progress = null)\n    {\n        // NOTE TO FUTURE DEVS: if this is causing merge conflicts with dev, just nuke it we don't need anymore\n        if (NodeDir.Exists)\n        {\n            try\n            {\n                var result = await RunNode(\"-v\");\n                if (result.Contains(\"20.19.3\"))\n                {\n                    Logger.Debug(\"Node.js already installed at {NodeExistsPath}\", NodeDir);","sourceCodeStart":493,"sourceCodeEnd":529,"githubUrl":"https://github.com/LykosAI/StabilityMatrix/blob/af93d6ef57c01cd890d7e0ad0a9ea8c9fcda3002/StabilityMatrix.Avalonia/Helpers/UnixPrerequisiteHelper.cs#L493-L529","documentation":"RunDotnet launches dotnet8 (e.g. for packages like SWARM or other dotnet-based backends) and throws ProcessException containing args, exit code, stdout, and stderr on any nonzero exit. It is the dotnet execution wrapper for Linux package requirements.","triggerScenarios":"A dotnet8 invocation exits nonzero — runtime not installed/wrong version, missing ASP.NET runtime for a web package, missing shared libraries on the distro, or the launched app crashing at startup.","commonSituations":"dotnet8 not present on PATH (dotnet installed only under a different name/version); running a package needing .NET 8 on a distro without libicu or other libs; app-level startup crash visible in the exception's stdout/stderr.","solutions":["Read the exception's stdout/stderr to find the actual dotnet failure and fix accordingly.","Install .NET 8 runtime (and ASP.NET Core runtime if the package hosts a web server) so 'dotnet8' resolves.","Install missing native dependencies (e.g. libicu) reported by dotnet on minimal distros.","Verify the dotnet binary path/alias used by Stability Matrix matches your system's dotnet installation."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"var dotnet = which(\"dotnet8\"); // verify presence and version\nif (string.IsNullOrEmpty(dotnet)) throw new Exception(\"dotnet8 runtime is required\");","typeGuard":null,"tryCatchPattern":"try { await helper.RunDotnet(args); }\ncatch (ProcessException ex)\n{ logger.Error(ex, \"dotnet8 step failed; see stdout/stderr in message\"); }","preventionTips":["Install .NET 8 (and ASP.NET Core 8) runtime and expose it as/alongside 'dotnet8'.","Install required native libs (libicu, libssl) on minimal distros.","Check the exception's stdout/stderr for app-level startup errors.","Keep the runtime version aligned with the package's requirements."],"tags":["dotnet","process-exit-code","linux","runtime","package-install"],"backgroundTag":"command-not-found","analyzedSha":"af93d6ef57c01cd890d7e0ad0a9ea8c9fcda3002","analyzedAt":"2026-09-12T19:02:43.389Z","contentChangedAt":"2026-09-12T19:02:43.389Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}