C#: Running and Debugging a Windows Service

后端 未结 2 1894
感动是毒
感动是毒 2021-01-15 10:22

I am currently building a Windows Service with C# and I just can\'t figure out how to debug it.


I am building it and then registering with installutil

相关标签:
2条回答
  • 2021-01-15 10:48

    Upon further research, I realized that I had no Installer attached to the service, so the problem was now fixed by adding an Installer.

    Here is the tutorial I used to add a Service Installer and so on.

    0 讨论(0)
  • 2021-01-15 10:51

    Try Task Manager and see if you see MusicRepo_FileMonitor.exe. If not, then the service is definitely not running.

    Alternatively, in Visual Studio, Debug > Attach to Process, check show processes from all users, and see if its there.

    0 讨论(0)
提交回复
热议问题