NullReferenceException in Installer.Uninstall()


D

Daniel Pratt

Hi All,

I have a Windows Service project that contains an "Installer" class that is
used to install and uninstall the service. The installer class (call it
MyServiceInstaller) inherits from System.Configuration.Install.Installer, of
course. The constructor for MyServiceInstaller configures and adds a
ServiceProcessInstaller object and a ServiceInstaller object to the
Installers collection.

This setup works fine 99% of the time. Recently, though, when the service
was uninstalled from a particular machine, the uninstall generated a
NullReferenceException. The exception caused the uninstall to roll back
(i.e. the service couldn't be uninstalled). This machine is used for testing
and several successfull installs/uninstalls had already been performed on
it.

I thought it would be relatively easy to find and fix the problem until I
realized that the exception occurred in
System.Configuration.Install.Installer.Uninstall(), not in my code. Without
debug symbols, I find it basically impossible to know what's going on when
the exception occurs. I didn't find Reflector to be much help, either. This
is framework v1.1, by the way.

Thanks for any help.

Regards,
Daniel
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top