Dev Team Assemble

Evil beware!
Add to Technorati Favorites

Archive

Tag: visual studio

Here is some useful information that I always seem to forget when developing windows services.

  • To install/uninstall manually, which i find helpful to do from the bin folder of your project use the following commands:
    • INSTALL: %windir%\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe [the name of the executable]
    • UNINSTALL: %windir%\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe -u [the name of the executable]
  • To Debug a windows service add the following code to your Main method

    static void Main(string[] args)
    {
    #if DEBUG
    System.Diagnostics.Debugger.Break();
    #endif

    ServiceBase.Run(new Service());

    }

  • To create an installation package for a service: ....I will come back to that - no time to put it together today :)

Technorati Tags: , , ,

Great post here with a fix/workaround. Essentially when you go to look in the windows .net framework directory that program is not there. In order to run this utility program you will need to use the Visual Studio command prompt that is in the Programs/Visual Studio menu.

Technorati Tags: , , , ,