dotnet / dotnet/sdk

Enable dotnet run to execute multiple commands and manage their lifecycle

Open
#51,401 1 comment 0 reactions 0 assignees View on GitHub
Area-CLI Area-Run untriaged
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

For web scenarios, we often need to launch multiple processes when running a web project. For example, when building a frontend JavaScript based app with an ASP.NET Core backend you typically want to launch the frontend using the JavaScript framework's development server. Another example is Blazor WebAssembly apps need to launch a separate debug proxy process to enable in-browser debugging.

ASP.NET Core provides custom mechanisms to launch these processes, like the [SpaProxy](https://github.com/dotnet/aspnetcore/tree/main/src/Middleware/Spa/SpaProxy/src) component, which injects a hosting startup assembly that run a script to start the dev server process and monitors the main dotnet process to kill the dev server when the main process is terminated. These mechanisms are difficult to manage and error prone.

Proposal: The ideal solution would be to be able to specify the commands to run in an item group and for the SDK/IDE to take on the role of stopping all the processes. Provide a `RunCommand` item group where each `RunCommand` would be able to specify exe, args, env and the SDK would launch all of them and make sure they get stopped.

@baronfel @javiercn

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.