After the Dotnet SDK/Runtime is installed, you can see a file named dotnet.exe in the C:\Program Files\dotnet directory.
-
Copy your dotnet program (.dll, .exe, configuration files, etc.) to an appropriate directory.
-
Extract the nssm-2.24.zip file, open cmd or PowerShell and navigate to the nssm directory, then execute
.\nssm.exe install
A window will pop up as shown below
NSSM download links:
https://nssm.cc/download
https://www.nuget.org/packages/NSSM
- Interface explanation
- In the Application Path, fill in C:\Program Files\dotnet\dotnet.exe;
-
In the Startup directory, enter the directory where the monitoring program package is located;
-
In the Arguments, enter AAA.dll
-
For the Service name, specify the name of the monitoring program in the Windows services, for example, if you fill in AAA, you can set it freely;
Then click Install service to complete the installation. After that, you can open the Task Manager, click "Services", and see the program.
文章评论