{"id":15487009,"url":"https://github.com/rickstrahl/visualstudiosnippetconverter","last_synced_at":"2025-04-22T16:37:37.498Z","repository":{"id":66331204,"uuid":"160334610","full_name":"RickStrahl/VisualStudioSnippetConverter","owner":"RickStrahl","description":"Utility to convert Visual Studio Code Snippets to VS Code and Rider.","archived":false,"fork":false,"pushed_at":"2019-01-16T01:11:54.000Z","size":611,"stargazers_count":24,"open_issues_count":0,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-22T16:32:58.090Z","etag":null,"topics":["rider-settings","snippets","visual-studio","visual-studio-code","visual-studio-snippets"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RickStrahl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-04T09:46:06.000Z","updated_at":"2024-11-05T05:36:24.000Z","dependencies_parsed_at":"2023-02-20T23:00:21.037Z","dependency_job_id":null,"html_url":"https://github.com/RickStrahl/VisualStudioSnippetConverter","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RickStrahl%2FVisualStudioSnippetConverter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RickStrahl%2FVisualStudioSnippetConverter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RickStrahl%2FVisualStudioSnippetConverter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RickStrahl%2FVisualStudioSnippetConverter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RickStrahl","download_url":"https://codeload.github.com/RickStrahl/VisualStudioSnippetConverter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250278439,"owners_count":21404206,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["rider-settings","snippets","visual-studio","visual-studio-code","visual-studio-snippets"],"created_at":"2024-10-02T06:20:47.932Z","updated_at":"2025-04-22T16:37:37.444Z","avatar_url":"https://github.com/RickStrahl.png","language":"C#","funding_links":["https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=DJJHMXWYPT3E2"],"categories":[],"sub_categories":[],"readme":"# Visual Studio Snippet Converter\n\n\u003cimg src=\"SnippetConverterIcon.png\" height=200\u003e\n\nThis is a small project to convert Visual Studio's Code Snippets (XML .snippet files) to:\n\n* VS Code Code Snippets \n* Rider Live Templates (experimental)\n\nThis tool is available as a **.NET Global Tool** that is easily installable as a command line utility using the .NET Core SDK 2.1 or later.\n\n## Visual Studio Code Conversion\nThis tool can take individual Visual Studio snippets, a folder full of `.snippet` files, or an entire folder hierarchy and create or update a single `.code-snippet` file with each of the the snippets added from Visual Studio into a VS Code snippet file.\n\n\u003e Note that Rider support is limited to C#,VB.NET and HTML snippets only. Other language templates are stored in a completely different format and are currently not supported. If there's interest in that we might consider adding it later - for now this isn't supported.\n\n### Using the .NET SDK Tool Console Application\nThe easiest way to use this tool is to install the [.NET Global Tool from NuGet](https://www.nuget.org/packages/dotnet-snippetconverter/). \n\nTo install use:\n\n```ps\ndotnet tool install --global dotnet-snippetconverter\n```\n\n**Requires:**  \n[.NET Core 2.1 SDK](https://dotnet.microsoft.com/downloadhttps://dotnet.microsoft.com/download) or later\n\nOnce installed you should able to run:\n\n```ps\nsnippetconverter\n```\n\nfrom the Terminal and get the usage Help screen.\n\nAlternately, you can clone the project and run it out of the `.\\SnippetConverter` folder with:\n\n```\ndotnet run\n```\n\nOr, after compiling in the `.\\SnippetConverter\\bin\\release\\netcore2.2\\publish` folder use:\n\n```\nsnippetconverter\n```\n\n### Command Line Options\n\n```text\nVisual Studio Snippet Converter\n-------------------------------\n© Rick Strahl, West Wind Technologies\n\nSyntax:\n-------\nSnippetConverter \u003csourceFileOrDirectory\u003e -o \u003coutputFile\u003e \n                 --mode --prefix --recurse --display\n\nCommands:\n---------\nHELP || /?          This help display           \n\nOptions:\n--------\nsourceFileOrDirectory  Either an individual snippet file, or a source folder\n                       Optional special start syntax using `~` to point at User Code Snippets folder:\n                       ~      -  Visual Studio User Code Snippets folder (latest version installed)\n                       ~2017  -  Visual Studio User Code Snippets folder (specific VS version 2019-2012)                       \n\n-o \u003coutputFile\u003e        Output file where VS Code snippets are generated into (ignored by Rider)   \n                       Optional special start syntax using `~` to point at User Code Snippets folder:\n                       %APPDATA%\\Code\\User\\snippets\\ww-my-codesnippets.code-snippets\n                       ~\\ww-my-codesnippets.code-snippets\n                       if omitted generates `~\\exported-visualstudio.code-snippets`\n                       \n-m,--mode              vs-vscode  (default)\n                       vs-rider   experimental - (C#,VB.NET,html only)\n-d                     display the target file in Explorer\n-r                     if specifying a source folder recurses into child folders\n-p,--prefix            snippet prefix generate for all snippets exported\n                       Example: `ww-` on a snippet called `ifempty` produces `ww-ifempty`\n\nExamples:\n---------\n# vs-vscode: Individual Visual Studio Snippet\nSnippetConverter \"~2017\\Visual C#\\My Code Snippets\\proIPC.snippet\" \n                 -o \"~\\ww-csharp.code-snippets\" -d\n\n# vs-vscode: All snippets in a folder user VS Snippets and in recursive child folers\nSnippetConverter \"~2017\\Visual C#\\My Code Snippets\" -o \"~\\ww-csharp.code-snippets\" -r -d\n\n# vs-vscode: All the user VS Snippets and in recursive child folders\nSnippetConverter ~2017\\ -o \"~\\ww-all.code-snippets\" -r -d\n\n# vs-vscode: All defaults: Latest version of VS, all snippets export to  ~\\visualstudio-export.code-snippets\nSnippetConverter ~ -r -d --prefix ww-\n\n# vs-rider: Individual VS Snippet\nSnippetConverter \"~2017\\proIPC.snippet\" -m vs-rider -d\n\n# vs-rider: All VS Snippets in a folder\nSnippetConverter \"~2017\\Visual C#\\My Code Snippets\" -m vs-rider -d\n```\n\n### Use at your own Risk\nThis is a rough project I created to just get the job of converting my CSharp, HTML and JavaScript templates between environments. I make no guarantees that it'll move all types of snippets nor that it will capture all features of the snippets. Visual Studio Code export works very well for all types that I've tried (moving my entire snippets folder of 130+ snippets). Rider will require selectively using supported .NET Languages and HTML.\n\nYour mileage may vary!\n\n## License\nThe SnippetConverter library is licensed  under the [MIT License](https://opensource.org/licenses/MIT) and there's no charge to use, integrate or modify the code for this project. You are free to use it in personal, commercial, government and any other type of application.\n\nAll source code is copyright **West Wind Technologies**, regardless of changes made to them. Any source code modifications must leave the original copyright code headers intact.\n\n\u003c!-- \n\u003e It's free as in free beer, but if this saved you some time and you're overflowing with gratitude you can buy me a beer:\n\u003e\n\u003e [**Donate with PayPal**](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=DJJHMXWYPT3E2)\n--\u003e\n\n## Warranty Disclaimer: No Warranty!\nIN NO EVENT SHALL THE AUTHOR, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THIS PROGRAM AND DOCUMENTATION, BE LIABLE FOR ANY COMMERCIAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM INCLUDING, BUT NOT LIMITED TO, LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR LOSSES SUSTAINED BY THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS, EVEN IF YOU OR OTHER PARTIES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n\n## Additional Resources\n* [SnippetConverter Blog Post](https://weblog.west-wind.com/posts/2019/Jan/14/A-Visual-Studio-to-Visual-Studio-Code-Snippet-Converter)\n* [Create VS Code Code Snippets](https://code.visualstudio.com/docs/editor/userdefinedsnippets)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frickstrahl%2Fvisualstudiosnippetconverter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frickstrahl%2Fvisualstudiosnippetconverter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frickstrahl%2Fvisualstudiosnippetconverter/lists"}