程序安装提示……正在安装程序集“e:\c#开发文档\csharptest\wtservice\bin\debug\wtservice.exe”。
受影响的参数是:
   assemblypath = e:\c#开发文档\csharptest\wtservice\bin\debug\wtservice.exe
   logfile = e:\c#开发文档\csharptest\wtservice\bin\debug\wtservice.InstallLog
无法创建 WTService.WTInstaller 安装程序类型的实例。
System.Reflection.TargetInvocationException: 调用的目标发生了异常。
引发了内部异常 System.InvalidOperationException,错误信息如下:appSettings 配置节中不存在项“WTserviceInstaller.DisplayName”。。可是在配置文件中存在项“WTserviceInstaller.DisplayName”,实在搞不明白了

解决方案 »

  1.   

    应该是这里有问题 不过这是系统自己加的代码this.WTserviceInstaller.DisplayName = ((string)(configurationAppSettings.GetValue("WTserviceInstaller.DisplayName", typeof(string))));
    this.WTserviceInstaller.ServiceName = ((string)(configurationAppSettings.GetValue("WTserviceInstaller.ServiceName", typeof(string))));
      

  2.   

    http://community.csdn.net/Expert/FAQ/FAQ_Index.asp?id=201968
      

  3.   

    做了个服务程序,服务程序的属性是用“动态属性”写在config文件里了。编译没有问题,但在服务程序安装时会提示“appSettings 配置节中不存在项”。而这些项在config的appSettings 配置节中都是有的。