Respond to dialog boxes using DTE.ExecuteCommand

丶灬走出姿态 提交于 2019-12-12 18:41:20

问题


Is there a way to say Yes or No or OK to a dialog/message box while opening Visual Studio 2015 using EnvDTE?

I've tried debugging my application while the box is open but I have no idea what to look for. I've also tried searching within this list of commands but cannot find anything that responds to a message box.

I am using code based on this Microsoft guidance to open an instance of Visual Studio, open a solution and then run commands against it.

The messages that come up upon opening my solution are related to TFS. My application works otherwise, but cannot get past these dialog boxes to execute commands. The first one says this:

Team Foundation Server Version Control The solution you are opening is bound to source control on the following team foundation server: . Would you like to contact this server to enable source control integration? yes no help

I want to press No

Then I see this box, which I need to press OK on 3 times.

来源:https://stackoverflow.com/questions/56700937/respond-to-dialog-boxes-using-dte-executecommand

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!