问题
I have an Outlook 2007 add-in project in Visual Studio 2013. It's been working fine forever, and all of a sudden Visual Studio keeps refusing to debug, with an error message saying
Cannot debug the add-in because 'Outlook' is already running. Close 'Outlook' and then run the project again.
No, outlook is not running. There is no Outlook process visible in the processes tab of Task Manager.
I'm sure restarting the machine would resolve the issue but I am working remotely and cannot reboot for a week. Restarting visual studio and outlook has not worked. I tried this answer but as I noted in my comment to the answer, breakpoints don't get triggered.
How does Visual Studio check for running outlook?
回答1:
Outlook was running as a suspended process. It could not be seen in the 'processes' tab of Task Manager; I found it in the 'details' tab. It was misleading because I could still start (manually a new instance of) Outlook and shut it down and yet Visual Studio kept reporting that Outlook was already running. Anyway, I was able to resume the suspended instance of Outlook from Resource Monitor (which can be opened from Task Manager's 'Performance' tab (hyperlink at the bottom that says 'Open Resource Monitor'). After resuming the suspended Outlook process and shutting it down, debugging the outlook add in worked fine.
来源:https://stackoverflow.com/questions/34441549/cannot-debug-the-add-in-because-outlook-is-already-running