Is ServiceInstaller getting obsolete in .NET 3.5+

For using ServiceInstaller I had to go and add it manually to toolbox, it wasn't there by default. But there was something by default in toolbox called ServiceController. So I was wondering if this is better and should be used instead of ServiceInstaller in new versions of .NET?


No, it is not obsolete (see ServiceInstaller Class). ServiceController is exactly what it sounds like a class for programmatically controlling the state of a Windows service (see ServiceController Class). ServiceInstaller doesn't appear in the toolbox because it is usually added by using Add Installer to create the class in the service project (See How to: Add Installers to Your Service Application).

ServiceInstaller and ServiceController do completely different but related things

A ServiceInstaller is used for Windows Services. When a windows service gets installed on the machine ither through InstallUtil.exe or an Msi it gets run and allows you to do things like register an event source on the machine.

ServiceController is a class that allows you to connect to a service and do things like start and stop it via code. This can be used from any type of application.

No its not obsolete. It would be marked as deprecated if it were in the documentation. And it would likely have the ObsoleteAttribute attribute on its members. For example of that see ConfigurationSettings.AppSettings Property

Need Your Help

Entity Framework and SQL Server temp tables

c# sql-server entity-framework sqlbulkcopy tempdb

We have a legacy application which we are moving to C#, and I would like to use Entity Framework (EF) for data access. SQL Server 2012 is the database, and currently I am using EF 5.0. The original

Ruby gsub case insensitive not working as expected

ruby regex gsub

I have a problem with a regex I am using for gsub. The part of my program that is problematic loads two text files: one that it will work on, and another one as an array of abbreviations. The thing...