I have written a script to build and run my dotnet project but it seems I am not able to stop it. The code I wrote is below.
do shell script "eval $(/usr/libexec/path_helper -s) cd /Users/Projects/sth.api dotnet run &"
Upon triggering this script from Script Editor, I am not able to stop it again. I don't want my project to run all the time. Now I need to open Activity Monitor and find the dotnet application which is also impossible so I have to stop all dotnet projects.
I have exported script as Application, and clicked Show Startup Screen and Stay Open After Run Handler. That opens a dialog with Run and Quit buttons. I want to stop the dotnet project when I clicked the Quit button.