Treat custom file extension as CSharp RRS feed

  • Question

  • Hi, 

    I'm trying to open up files of type '.mcsx' as if they were .cs files in Visual Studio 2012 - i.e. with code completion and with rich formatting. I've tried a number of things to no avail:

    1) I've tried writing a VSIX extension that registers a custom ContentType:

     static class ContentType
            public const string Name = "MyCScript";
            [DisplayName("CSharp Script")]
            public static ContentTypeDefinition MarkdownModeContentType = null;
            public static FileExtensionToContentTypeDefinition MkdFileExtension = null;

    2) I've also tried creating an extension package following this blog post: http://blogs.msdn.com/b/noahric/archive/2010/03/01/new-extension-css-is-less.aspx. I managed to grab the appropriate GUID from the registry and create a VSIX with just a pkgdef file with the following entries (and included it in the vsix):

    [$RootKey$\Languages\File Extensions\.mcsx]

    In this case the entries appear in the registry, but I'm still not getting CSharp completion for my mcsx files. Can anyone help me?

    Friday, June 21, 2013 7:49 AM


All replies