In a .NET core console app, I'd like to get the running process name, I used ProcessName
as the docs say, but it always returns dotnet
as the process name, not the actual underline dll that is running. Although it is a dll, this is a console app, not a library.
Console.WriteLine(Process.GetCurrentProcess().ProcessName);
output
dotnet