【发布时间】:2012-07-16 07:24:26
【问题描述】:
我面临一个奇怪的问题。我通过各种博客和教程创建了我的第一个 Windows 服务。 然后为添加安装程序等创建设置。它在安装时工作正常,通过 Visual Studio 卸载但在我部署它时失败。
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of C:\Users\bhuvint\Documents\Visual Studio 2010\Projects\CPNS Library\ServicePackage\CommonPushNotificationWindowsService.application resulted in exception. Following failure messages were detected:
+ You cannot start application CommonPushNotificationWindowsService from this location because it is already installed from a different location.
+ You cannot start application CommonPushNotificationWindowsService from location file:///C:/Users/bhuvint/Documents/Visual%20Studio%202010/Projects/CPNS%20Library/ServicePackage/CommonPushNotificationWindowsService.application it is already installed from location file:///C:/inetpub/wwwroot/ServicePackage/CommonPushNotificationWindowsService.application. You can start it from location file:///C:/inetpub/wwwroot/ServicePackage/CommonPushNotificationWindowsService.application or you can uninstall it and reinstall it from location file:///C:/Users/bhuvint/Documents/Visual%20Studio%202010/Projects/CPNS%20Library/ServicePackage/CommonPushNotificationWindowsService.application.
我已经卸载了该服务,并尝试从同一台电脑上的已部署服务安装它以进行测试。但它因上述错误而失败。 我觉得我以错误的方式部署了 Windows 服务。你们能否建议如何部署 Windows 服务? (我已经浏览过网络。所有建议从视觉工作室构建并安装它。但是如何发布它是我需要的东西。 )
请尽快帮忙。
【问题讨论】:
-
如果确实停止并卸载了服务,您是否签入了服务
-
你检查过services.msc(通过Windows键+R)你的服务名称还在吗?然后您可能必须先将其删除。简单的谷歌搜索会告诉你如何:)
-
@JohnnBlade 和 Gerald- 是的,我已经做到了。确实已经卸载了。
-
我建议从控制面板卸载。当我这样做时,它不会重新安装失败
标签: c# visual-studio