Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does dotnet run launch 2 processes?

When I run my dotnet core 2 app from my PowerShell I always see 2 processes launched. This is annoying as in Visual Studio 2017 I cannot "reattach" a debugger as there are always 2 processes with the same name "dotnet".

enter image description here

Any way to change this?

like image 877
PeterFromCologne Avatar asked Jan 01 '26 10:01

PeterFromCologne


1 Answers

dotnet run is a development command that builds the project and queries the project for the actual command to run. It then launches the program described in the program - which may be a dotnet some.dll or someapp.exe depending on the program type.

To work around your issue, run a command like

dotnet bin\Debug\netcoreapp2.0\mapp.dll

directly to avoid process noise.

You can also chain a build command before it so you can rebuild the project on changes and still have the process that runs msbuild terminate:

dotnet build; dotnet bin\Debug\netcoreapp2.0\mapp.dll
like image 165
Martin Ullrich Avatar answered Jan 05 '26 05:01

Martin Ullrich



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!