Skip to content

[Feature Request] Detect missing ASP.NET runtime on Linux #407

@CodesInChaos

Description

@CodesInChaos

I installed NetPad on Manjaro (Arch based) from AUR. The .NET Core Runtime and .NET SDK were installed from the official repos. But I was missing the ASP.NET Runtime (optional dependency).

This made the script host crash immediate with this confusing error:

script-host process stopped unexpectedly
System.InvalidOperationException: No process is associated with this object.
at System.Diagnostics.Process.EnsureState(State state)
at System.Diagnostics.Process.get_HasExited()
at NetPad.Utilities.ProcessUtil.IsProcessRunning(Process process) in /home/runner/work/NetPad/NetPad/src/Core/NetPad.Runtime/Utilities/ProcessUtil.cs:line 25
at NetPad.ExecutionModel.ClientServer.ScriptHost.ScriptHostProcessManager.IsScriptHostRunning() in /home/runner/work/NetPad/NetPad/src/Core/NetPad.Runtime/ExecutionModel/ClientServer/ScriptHost/ScriptHostProcessManager.cs:line 51
at NetPad.ExecutionModel.ClientServer.ScriptHost.ScriptHostProcessManager.PublishLifetimeEvent() in /home/runner/work/NetPad/NetPad/src/Core/NetPad.Runtime/ExecutionModel/ClientServer/ScriptHost/ScriptHostProcessManager.cs:line 276
at NetPad.ExecutionModel.ClientServer.ScriptHost.ScriptHostProcessManager.EnsureScriptHostStarted() in /home/runner/work/NetPad/NetPad/src/Core/NetPad.Runtime/ExecutionModel/ClientServer/ScriptHost/ScriptHostProcessManager.cs:line 183
at NetPad.ExecutionModel.ClientServer.ScriptHost.ScriptHostProcessManager.EnsureScriptHostStarted() in /home/runner/work/NetPad/NetPad/src/Core/NetPad.Runtime/ExecutionModel/ClientServer/ScriptHost/ScriptHostProcessManager.cs:line 118
at NetPad.ExecutionModel.ClientServer.ScriptHost.ScriptHostProcessManager.RunScript(Guid runId, DirectoryPath scriptHostDepsDir, DirectoryPath scriptDir, FilePath scriptAssemblyPath, String[] probingPaths) in /home/runner/work/NetPad/NetPad/src/Core/NetPad.Runtime/ExecutionModel/ClientServer/ScriptHost/ScriptHostProcessManager.cs:line 60
at NetPad.ExecutionModel.ClientServer.ClientServerScriptRunner.<>c__DisplayClass20_0.<b__0>d.MoveNext() in /home/runner/work/NetPad/NetPad/src/Core/NetPad.Runtime/ExecutionModel/ClientServer/ClientServerScriptRunner.cs:line 209
You must install or update .NET to run this application.

App: /tmp/NetPad/Execution/ClientServer/Processes/c5d0164f-0a35-4772-91ae-67398cc7121f/script-host/netpad-script-host
Architecture: x64
Framework: 'Microsoft.AspNetCore.App', version '10.0.0' (x64)
.NET location: /usr/share/dotnet

No frameworks were found.

Learn more:
https://aka.ms/dotnet/app-launch-failed

To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.AspNetCore.App&framework_version=10.0.0&arch=x64&rid=arch-x64&os=manjaro

The script did not have "Reference ASP.NET" checked. So I'm not sure why this runtime is required in the first place.

I suggest checking for the ASP.NET runtime in the dependency check window, and outputting that information along with the error as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions