调试 - 工具间歇性地工作 [英] Debugging - Tool works intermittantly

查看:57
本文介绍了调试 - 工具间歇性地工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Visual Studio Professional 2015中工作


以下代码直接来自Microsoft网站,但将目标文件夹更改为"Ergo"除外。我将代码复制到Visual Studio中并点击f5,它将加载项加载到outlook中,并且按照承诺,将所有电子邮件移动到
,主题行为"Test"。进入"Ergo" 。夹 总计10封电子邮件。


为了确保它不是侥幸并且我正确理解了代码,我将其中5封电子邮件移回默认收件箱,关闭Outlook,然后点击f5再次。 这一次,什么都没发生。 从那时起,我还给自己发了一封名为"Test"的新的
电子邮件,其中一些是我"读"的电子邮件。我离开了"未读"而没有结果。


我已经尝试禁用加载项,甚至完全删除它,但我似乎无法得到这个去吧。 我没有改变一段代码,但它突然不起作用。 我刚刚开始学习代码,但我认为如果在运行之间没有触及代码
,它会产生相同的结果。 我错过了什么? 这是原始的Microsoft代码(https://msdn.microsoft.com/en-us/library/ms268996.aspx)

解决方案

您好,


Application.NewMail事件(Outlook)
收件箱


 当新邮件到达收件箱时以及客户端规则处理发生之前, NewMail 事件将触发。如果您要处理以
收件箱到达的商品,请考虑使用  ItemAdd 活动
收件箱中的项目集合。在  ItemAdd 事件会将引用传递给添加到文件夹的每个项目。


 当用户处于离线模式时, NewMail 事件不会触发。


所以请在 private <处添加断点/ span> void
ThisAddIn_NewMail (),确保您处于在线模式,然后发送邮寄到您的帐户。如果它会到达断点,然后按F5继续,它将移动未读的邮件项目并具有"测试"功能。在主题。
如果它没有达到断点,请转到选项 - >加载项以确保加载项位于活动应用程序加载项中。


问候,


Celeste


Working in Visual Studio Professional 2015

The below code is directly from Microsoft's website with the exception of changing the destination folder to "Ergo". I copied the code into Visual studio and hit f5, which loaded the add-in to outlook and, as promised, moved all my emails with the subject line "Test" into the "Ergo" folder.  10 Emails in total.

To make certain it wasn't a fluke and that I understood the code correctly, I moved 5 of those emails back to the Default Inbox, closed Outlook, and hit f5 again.  This time, nothing happened.  Since this time, I've also emailed myself a few new emails named "Test", some which I "Read" and others I left "unread" with no results either.

I've tried disabling the add-in, even removing it entirely, but I can't seem to get this to go.  I've not changed a single piece of the code, and yet it suddenly does not work.  I'm just starting to study code, but I would think that if the code wasn't touched between running, it would have the same results.  What am I missing?  Here is the original Microsoft Code (https://msdn.microsoft.com/en-us/library/ms268996.aspx)

解决方案

Hello,

Application.NewMail Event (Outlook) occurs when one or more new e-mail messages are received in the  Inbox.

The  NewMail event fires when new messages arrive in the Inbox and before client rule processing occurs. If you want to process items that arrive in the Inbox, consider using the  ItemAdd event on the collection of items in the Inbox. The  ItemAdd event passes a reference to each item that is added to a folder.

The  NewMail event does not fire when the user is in offline mode.

So please add a breakpoint at private void ThisAddIn_NewMail(), make sure you are in online mode and then send a mail to your account. If it would hit the breakpoint, then press F5 to continue, it would move mailitems which are unread and have "Test" in subject. If it would not hit the breakpoint, please go to Options -> Add-ins to make sure the add-in is in Active Application Add-ins.

Regards,

Celeste


这篇关于调试 - 工具间歇性地工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆