简体   繁体   English

Visual Studio testc,如何摆脱它?

[英]Visual Studio testc, how to get rid of it?

I could have asked this question years ago, but I think it has finally annoyed me enough to ask this question. 我本可以在几年前问这个问题,但我认为它终于使我烦恼得要问这个问题。 Many times while I am coding, Visual Studio tries to Intellisense my deal with testc . 在编写代码的过程中, Visual Studio经常尝试Intellisensetestc交易。 I know that testc is a snippet for a test class, but it is something I will never use in anything except maybe a test project, and likely not even then. 我知道testc是测试类的testc ,但是除了测试项目,甚至在那时我都不会用到它。 So, how do I prevent this annoyance from ever appearing in my Intellisense options again? 因此,如何防止这种烦恼再次出现在我的Intellisense选项中? Yeah I know... stupid thing to worry about... 是的,我知道。。。愚蠢的事情要担心...

  1. On the Tools menu, click Code Snippets Manager. 在工具菜单上,单击代码片段管理器。
  2. Select the directory Test . 选择目录Test
  3. Click Remove. 单击删除。

Press CTRL + K, CTRL + B. This will bring up the code snippets manager. 按CTRL + K,CTRL +B。这将打开代码段管理器。 In the Visual C# directory, you can remove the snippets ( testc in your case) that you don't want to include. 在Visual C#目录中,可以删除不想包含的代码片段(在您的情况下为testc )。 Note that system generated snippets cannot be removed by this method, although per mojits answer you could remove the entire directory of snippets. 请注意,虽然每个Mojits回答都可以删除整个代码段目录,但是无法通过此方法删除系统生成的代码段。

One way around this is to delete the snippet file manually, by finding / deleting its actual file. 解决此问题的一种方法是通过查找/删除其实际文件来手动删除代码段文件。 I am using Visual C# express 2010 right now, and this is the directory they are in for me (you may have to modify slightly, and restart VS for changes to take effect). 我现在正在使用Visual C#express 2010,这是它们在我的目录(您可能必须稍作修改,然后重新启动VS才能使更改生效)。

C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC#\\Snippets\\1033\\Visual C# C:\\ Program Files(x86)\\ Microsoft Visual Studio 10.0 \\ VC#\\ Snippets \\ 1033 \\ Visual C#

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何摆脱 Visual Studio 中的命名规则违规消息? - How to get rid of Naming rule violation messages in Visual Studio? 如何在Visual Studio的调试器中摆脱System .__ Canon? - How to get rid of System.__Canon in debugger of Visual Studio? 摆脱Visual Studio命名空间错误消息 - Get rid of Visual Studio Namespace error message 在Visual Studio 2015编辑器中摆脱“对角线箭头” - Get rid of “diagonal arrow” in Visual Studio 2015 editor 如何摆脱Visual Studio设计器抛出的“Out of memory”异常? - How can I get rid of “Out of memory” exception thrown from Visual Studio designer? 如何摆脱Visual Studio 2010中令人讨厌的代码提示? - How do I get rid of annoying code tips in Visual Studio 2010? Visual Studio-Resharper-Stylecop:如何摆脱属性值的缩进? - Visual Studio-Resharper-Stylecop: How to get rid of the indent for property values? 如何摆脱 Visual Studio 中“[某些事件] 从未使用过”的编译器警告? - How do I get rid of “[some event] never used” compiler warnings in Visual Studio? 如何通过统一针对 Visual Studio 中错误的 .NET 框架来消除此错误警告 - How do I get rid of this error warning with unity targeting the wrong .NET framework in Visual Studio 无法摆脱 Visual Studio 2022 中的 ErrorProvider 消息 - Can't get rid of ErrorProvider message in Visual Studio 2022
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM