无法将代码段添加到VS 2015

时间:2016-10-05 11:35:04

标签: c# visual-studio-2015 code-snippets

我正在尝试将一个简单的代码段添加到Visual Studio 2015.自从VS2010以来我一直在使用该文件,因此它可以运行:

<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets
    xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
    <CodeSnippet Format="1.0.0">
        <Header>
    <Title>Custom Try Catch</Title>
    <Author>Me</Author>
    <Description>My custom try catch</Description>
    <Shortcut>tre</Shortcut>
</Header>
        <Snippet>
            <Code Language="csharp">
            <![CDATA[try
            {

            }
            catch (Exception erreur)
            {
                Utils.ManageException(erreur, this.GetType() + " > " + MethodInfo.GetCurrentMethod());
            }]]>
            </Code>
        </Snippet>
    </CodeSnippet>
</CodeSnippets>

我刚刚安装了VS2015并尝试重新添加它但是当我点击工具下的Code Snippets Manager时,我无法在语言列表中选择Visual C#。我的项目是在C#中,一切正常(默认c#片段)。

如果我点击&#34;导入&#34; VS没有给我任何错误,但我尝试时片段不起作用。

我怎么解决这个问题?我想问题是我无法在列表中选择Visual C#。

0 个答案:

没有答案