I have a .NET Windows serivce protected with {smartassembly} which works fine, except that I can't get the protected version to install. When I did the testing the service was already installed, then I copied the protected version over the original.
There are some instructions on the {smartassembly} web site regarding Windows services (How to protect Windows services?). I followed suggestion number one, using the CodeProject article (Windows Services Can Install Themselves) to embed the installer into the service. The self-install works fine until the service is protected.
The install log file shows the following error message:
An exception occurred while trying to find the installers in the C:\path-to-service\service.exe assembly. System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
I went back to tried removing any protection options that said they could cause problems with reflection. I still got the same error.
Then I tried turning all of the protection options off. Still the same error.
I have sent an email to {smartassembly} support but have not received a response yet. It has only been 24 hours, but I thought someone here on SO might have run into this issue before.
Any ideas?
Edit #1
I know I can write another exe that uses the Windows API to install the service, but I would like to get the built-in install working if possible.