我正在尝试使用 installutil.exe 来安装 Windows 服务。我让它工作了,但后来我在项目中添加了一些外部 DLL,现在安装失败了。Copy local
设置为真。外部 DLL 位于我的 Program Files 文件夹下的各种文件夹中。我以管理员身份打开 CMD 窗口。
将捕获代码放置在何处以获取该LoaderExceptions
属性?在安装程序类中?
catch (System.Reflection.ReflectionTypeLoadException ex)
{
}
这是错误的第一部分:
An exception occurred during the Install phase.
System.InvalidOperationException: Unable to get installer types in the
C:\Users\foo\My Documents\visual studio 2013\Projects\ReminderService\ReminderSer
vice\obj\Debug\reminderservice.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..