Windows Service: System.Reflection.ReflectionTypeLoadException was thrown with the following error message: Unable to load one or more of the re
问题:
The uninstall is beginning.
See the contents of the log file for the MonitorService.exe assembly's progress.
The file is located at MonitorService.InstallLog.
An exception occurred during the uninstallation of the System.Configuration.Install.AssemblyInstaller installer.
System.InvalidOperationException: Unable to get installer types in the MonitorService.exe assembly.
The inner exception System.Reflection.ReflectionTypeLoadException was thrown with the following error message: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information..
An exception occurred while uninstalling. This exception will be ignored and the uninstall will continue. However, the application might not be fully uninstalled after the uninstall is complete.
回答
Maybe you need to use another version of InstallUtil.exe:
- c:WindowsMicrosoft.NETFrameworkv2.0.50727InstallUtil.exe
- c:WindowsMicrosoft.NETFrameworkv4.0.30319InstallUtil.exe
- c:WindowsMicrosoft.NETFramework64v2.0.50727InstallUtil.exe
- c:WindowsMicrosoft.NETFramework64v4.0.30319InstallUtil.exe
Try to use x64 version from Framework64 subfolder.
不过还是推荐sc delete serviceName进行删除