Add option to have LINQPad allocate a console for the current script
Title
I'm building out an asp.net core spa app in a linqpad script and I have everything hooked up correctly and runs fine. Running the script launches npm to serve the client code. However doing so, it creates an unsightly console window that remains open for as long as I'm running the script.
All IO is redirected from that process anyway from the SPA services so you don't really interact with it. Could this window be suppressed somehow, similar to how it is not created when running the app through vscode?
Comments
It sounds like the console window is being created by your own code (or third-party code that you call). If it chooses to call a process that creates a Console window, there's nothing that you can do (that I'm aware of) to stop it.
I think it's just a matter of compiling as a console app instead of a windows app, at least then you'd have control over when and how the console is created? Not sure. Hopefully we can find a way to do this without altering/modifying the libs.
Line #97 in my screenshot eventually spawns a new process to run the angular dev server in the SpaServices.Extensions.
https://github.com/dotnet/aspnetcore/blob/v5.0.7/src/Middleware/SpaServices.Extensions/src/Npm/NodeScriptRunner.cs#L74