When creating a Windows Service, you will find that you need to need to create an Installer class too. This Installer class registers the service with the Service Control manager which, of course, allows the service to run properly. Once your service is complete, you will want to create a Deployment project. This project installs your service on other computers. So, here's the tip:
To make the service usable on the new computer, your deployment project must invoke the service Installer class. You do this by creating a custom install action that calls your service Installer class. This is so that your service can be registered with the Service Control Manager. Don't forget to also create a custom uninstall action so that the service Installer class can unregister your service from the Service Control manager too.
I forgot the custom uninstall action. I then spent 30 minutes manually uninstalling the service entries from the registry. Don't forget the uninstall action!
In a previous post (see Overridden Properties handled differently in C# and VB) I wrote that C# and VB were handling overridden properties differently. This is not the case. Brian Orrell wrote:
In C# you have not created a readonly property. You have simply only chosen to override the get implementation of the property. Try it out. If you use the derived class, you will have no problem setting the property that seems to be readonly.
The only difference is that VB does not allow you to override just one of the two accessor methods.
You can never make the accessibility of a derived class LESS than the accessibility of the ancestor.
After a quick check, I found that he is correct. I want to thank Brian for the heads-up, and to let everyone else have the correct information.
Thanks Brian!