Snippets

I noticed the other day that my custom snippet wasn't being displayed in Intellisense, even though the default C# sharp ones were.  I am using ReSharper 4.5 Intellisense, overriding Visual Studio's.  I poked around and found the live templates stuff, and noted that my snippet had not been imported into the Predefined Templates => C# => Imported Visual C# Snippets section.  It was present when I installed Visual Studio, and is still in Visual Studio's snippets directory.

The only difference I can see between my snippet and one of the built in ones, aside from the content itself, is the author tag, which shows my name instead of "Microsoft Corporation".

Is this expected behavior?  If so, how can I import mine?  Or do I need to just recreate it using Live Templates.  The latter seems like a bit of a waste, but if that's what it takes.

Thanks,
/bs

9 comments

I'm having the same issue, any luck with this?

-chad

0

Haven't seen any response on this issue.  I looked through the 4.5.1 release notes, but didn't see anything obviously relating to this.  Has the issue been fixed, or should I just work around it?

Thanks,
Brad

0

I realize this might be a small issue, but please at least address the issue instead of just ignoring it.

Is there a way to make my custom snippets import, or is there a guide somewhere to converting existing ones to ReSharper's format, or must I disable ReSharper snippets entirely?

Thanks,
Brad

0

Hello Brad
     I'm afraid Visual Studio doesn't provide any API to code snippets, so ReSharper cannot provide them directly in IntelliSense. As a workaround, we've created a set of live templates which are similar to default snippets. In order to make your custom snippets work with ReSharper you can either:
     1. Create custom live templates similar to your snippets
     2. Switch to built-in Visual Studio IntelliSense under ReSharper > Options > IntelliSense > General

     Thank you!

Andrey Serebryansky

Support Engineer

JetBrains, Inc

http://www.jetbrains.com

"Develop with pleasure!"
0

Is this still true for Resharper5? I am having the same problem, with the Code Contracts Snippets.

Any import/conversion tip would be appreciated.

0

Any new on this? Custom snippets works fine but I'd like to have them listed as default intellisense does...

0

Hello Corrado
     This is still a problem with ReSharper 5.0. You can create custom Live Templates similar to your Visual Studio snippets. Thank you!

Andrey Serebryansky

Support Engineer

JetBrains, Inc

http://www.jetbrains.com

"Develop with pleasure!"

0

And is there at least any way to import .snippet file? "Manual" way is quit annoying..

Thanks.

0

Please sign in to leave a comment.