Wednesday, 8 October 2008

C# Console Service Project Template for VS2008

Often, when I develop services I want to run them interactively from the command line. For example, for testing running under different user accounts with different privileges and for debugging purposes. After having written a few of these services by hand in a variety of languages I have finally had time to create a Visual Studio template for a ‘Console Service Application’. It is basically a modified version of the existing service template (with the implementation in a single class) with console properties enabled. In addition, there are a few lines of plumbing code to fork to the appropriate mode.

Simply drop the ConsoleService.zip file into <your documents directory>\Visual Studio 2008\Templates\ProjectTemplates\Visual C#.

1 comment:

jabrig said...

Work great..... Like a charm...

This is the best and simple to create a Console and Service hybrid...

U R The MAN!!!

cacingkalung