Create a combo command line / Windows service app

前端 未结 4 593
说谎
说谎 2021-02-02 16:19

What\'s the best way in C# to set up a utility app that can be run from the command line and produce some output (or write to a file), but that could be run as a Windows service

4条回答
  •  梦谈多话
    2021-02-02 17:02

    The best way to accomplish this from a design standpoint is to implement all your functionality in a library project and build separate wrapper projects around it to execute the way you want (ie a windows service, a command line program, an asp.net web service, a wcf service etc.)

提交回复
热议问题