SmartAssembly 8

'System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types' when obfuscating a Windows Service

When you obfuscate a Windows Service with embedded dependencies, and if the Windows Service is installed with InstallUtil.exe, the dependencies might not be loaded.

How to fix

In this case, you need to manually install the windows service and not rely on InstallUtil.exe (because it will not be able to load the dependencies).

There is a basic sample on how to register a Windows Service without using InstallUtil.exe here: http://www.codeproject.com/KB/dotnet/WinSvcSelfInstaller.aspx

For more information, see Using SmartAssembly with Windows Services.

If you continue to experience problems, please contact Redgate support.


Didn't find what you were looking for?