0

I am just curious if it is possible to write some logic inside a .snippet file or is there any work around to do something like that?

For example: Read an xml file and based on that generate the snippet.

Thanks in advance, Kasun

1 Answer 1

1

You probably need to move to a Visual Studio Add-in for this. (if you are using VS 2010 or lower, you could use a macro, but macros are not supported by VS 2012, so prefer an add in).

Sign up to request clarification or add additional context in comments.

5 Comments

Thanks.!! This lead me to a whole lot of interesting topics like add-ins, vspackages, macros.
This is kind of related and will be useful:social.msdn.microsoft.com/Forums/en-US/csharpide/thread/…
Hi again, Will it be possible to execute a macro inside from a snippet. Eg: type some snippet shortcut as usual and hit tab will insert a code block which is generated from a macro by reading some file depending on some logic?
I don't know of a way to do that, but you can bind a keyboard shortcut to a macro in Tools | Options | Keyboard.
Thank you I am going to do it with a Add-in.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.