Run a Windows Service as a console app

前端 未结 6 865
别跟我提以往
别跟我提以往 2020-12-02 12:30

I want to debug a Windows service but it pops an error message saying

Cannot start service from the command line or a debugger. A windows service

6条回答
  •  情歌与酒
    2020-12-02 12:55

    Please check if you are in "DEBUG" or "RELEASE" mode. I got this error when I was trying to debug the service in "RELEASE" mode. When I changed that to "DEBUG", everything worked fine.

    This is after you have correctly installed the service as suggested by other people above.

提交回复
热议问题