以编程方式更改Visual Studio选项 [英] Programmatically change Visual Studio Options
问题描述
如何以编程方式设置和取消设置Visual Studio选项?
How do I programmatically set and unset Visual Studio Options?
我已经进行了研究和故障排除,发现不可能了,具有讽刺意味的是,现在我发现自己需要此功能.
I have done the research and troubleshooting and found it is not possible, ironically now I find myself needing this functionality.
这是我回答的一个问题,它指明了为什么无法以编程方式单击"VS选项"对话框中的按钮的原因: 以编程方式重置VisualStudio快捷方式.
Here is a question I answered specifying why its not possible to programmitically click buttons in the VS Options Dialog: Programmatically reset VisualStudio shortcuts.
我不需要单击按钮,我需要根据屏幕截图更改布尔设置.
I dont need to click a button, I need to change a boolean setting as per screenshot.
请...如果您有任何未记录的方法..请帮助我.它将改善每个开发人员的生活,尤其是新手.
Please... if you have any undocumented methods.. please help me. It will improve every developers life, particularly newbies.
推荐答案
只需使用:
dte.Properties["Debugging", "General"].Item("EnableExceptionAssistant").Value=false;
大多数选项都可以通过这种方式检索和设置.另请参阅:
Most of the options can be retrieved and set this way. See also:
如何:从Visual Studio的DTE.Properties集合中获取属性Studio .NET.
这篇关于以编程方式更改Visual Studio选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!