0

This is similar to How to move Visual Studio's 'My Code Snippets' folder to another drive?, but the answer there is quite old and does not seem to work any more; furthermore, the relevant paths appear to have changed.

I created a code snippet via the VS snippets manager. It worked, but I wanted to change the shortcut. I couldn't see a way to delete the individual snippet in their UI, so I deleted the folder as it contained just that snippet. I am now finding myself unable to create a folder for my C# snippets.

When I go to save the snippet, I now see this window. The only option obviously makes no sense, and doesn't work in any case: enter image description here

I've tried the "add" button in their UI. I am sometimes able to add a folder that way.

enter image description hereBut if I do, the import still fails:

enter image description here

Given that I deleted the folder where the snippets were formerly located, how can I get snippet import to work?

William Jockusch
  • 26,513
  • 49
  • 182
  • 323

1 Answers1

0

I finally got this to work by renaming the file to the same name as one of the snippets at

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

I then moved the file to that location, giving admin permission when it asked. This seems frankly absurd. But it did work, for a while; at some point VS reset the snippet.

William Jockusch
  • 26,513
  • 49
  • 182
  • 323