API for adding Code Snippets Locations in visual studio
I'm currently creating a Visual Studio Add-In and require the ability to add a location for custom Code Snippets to the users Visual Studio Environment programatically. I'm aware of the DTE Command Tools.CodeSnippet开发者_开发问答sManager but don't know if there are command argurments which allow me to add these locations.
If you placed you snippets in either:
"%USERPROFILE%\Documents\Visual Studio 2010\Code Snippets"
Or if you want them only for C#...
"%USERPROFILE%\Documents\Visual Studio 2010\Code Snippets\Visual C#\My Code Snippets"
plus you can change "Visual C#" to "Visual Basic" "SQL" or "XML" or "Visual Web Developer" respectively.
and use File.Copy to get them to the right location...
精彩评论