开发者

How to run a console app as a windows service? I'm getting confused by the "ClickOnce" files MS gives by default (VS 2008, C#)

开发者 https://www.devze.com 2023-03-26 18:14 出处:网络
This may seem a bit silly but I can\'t figure out where to start. I\'ve found plenty of code online on how to do this, but I just don\'t know where to put it. I\'ve created a console app that I\'m try

This may seem a bit silly but I can't figure out where to start. I've found plenty of code online on how to do this, but I just don't know where to put it. I've created a console app that I'm trying to run in the background as a service (that will start when windows starts, close when windows closes etc..). I'm not sure what I should开发者_开发问答 be doing to facilitate this though. Should I create a new project in the same solution? Or a new class in the same project? When I do create the service, how can I install it? Do I just publish it? I've found some code online saying I should have a .exe file but all I have is ClickOnce?

Thanks in advance...


Have a look at

  • What says msdn about windows service
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号