在 DEBUG 模式下将 Windows 服务作为独立应用程序运行

发布于 2024-08-13 02:26:16 字数 146 浏览 1 评论 0原文

我有一个 Windows 服务,每次在开发过程中调试应用程序时都需要安装(installutil)。有什么方法可以调整 Installer/ProjectInstaller 类,以便它在调试模式下作为控制台应用程序运行。像 #if..#endif 预处理器这样的东西可以帮助吗?

I've a windows service that I need to install (installutil) every time I debug the application during development. Is there any way I can tweak the Installer/ProjectInstaller classes so that it runs as a console application during debug mode. Something like #if..#endif preprocessors can help?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

通知家属抬走 2024-08-20 02:26:16

不确定这是否有帮助,但是当我编写服务时,我将服务的“worker”部分编写为 DLL 并从 Winform/控制台应用程序使用它。我只使用实际的服务来调用已经经过测试且稳定的工作 DLL。

Not sure if this helps, but when I write services I write the "worker" part of the service as a DLL and use it from a Winform/console app. I only use an actual service to call into the already tested and stable worker DLL.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文