Skip to main content
 首页 » 编程设计

c#之已添加项目。安装 Windows 服务时出错

2024年02月23日21kerrycode

我正在安装 Windows 服务。当安装程序完成安装事件中编写的代码时。它给出了以下错误。

Error 1001. Item has already been added. Key in dictionary: '_reserved_lastInstallerAttempted' Key being added: '_reserved_lastInstallerAttempted',

我已经在注册表中搜索了上述键的各种可能性,但都是徒劳的。我已经使用了 try catch 。错误既没有显示任何堆栈跟踪也没有显示源。

请您参考如下方法:

检查您的 Installer 实现 void Install(IDictionary stateServer) 重写以查看您是否调用了 base.Install(stateServer) 两次。