需要在 Visual Studio 运行时发送电子邮件通知

发布于 2024-09-26 07:23:55 字数 304 浏览 1 评论 0原文

我正在使用 Visual Studio 2005 执行一个测试执行项目(使用 pnunit 框架和 C#,但它不相关)。总执行时间超过40小时。在此期间,如果网络上存在任何环境问题(外部因素,如远程服务器关闭、数据库关闭等),代码将停止执​​行。这会产生一个问题,因为当我注意到错误时,我必须手动正确设置外部因素并再次恢复运行。因此,经常检查执行进度变得很重要,以确保我们不会因为执行停止而浪费时间,这很麻烦。

我正在寻找一种方法,以某种方式在代码停止运行时触发电子邮件/批处理脚本/exe/任何内容。我有什么办法可以实现这个目标吗?有什么想法吗?

谢谢, 无限

I'm executing a test-execution project using visual studio 2005 (using the pnunit framework and C# but its not relevant). The total execution time is more than 40 hours. In between if there are any environment problems on the network (external factors like remote server is down, db is down etc) the code stops executing. This creates a problem because when I notice the error I'll have to manually set external factors right and again resume the run. So it becomes important to keep checking the execution progress frequently to make sure we are not losing time due to halted execution, which is troublesome.

I looking for a way to somehow either triggering an email/batch script/exe/anything when the code stops running. Is there any way I could achieve this? Any ideas?

Thanks,
Mugen

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

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

发布评论

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

评论(1

月亮坠入山谷 2024-10-03 07:23:55

如果您只需要在申请结束时触发电子邮件,那么我建议将代码放在这里 在执行结束时。

If you only need to trigger an email at the end of the application, then I would suggest putting the code here at the end of your execution.

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