README
This project builds a Visual Studio extension (VSIX) containing code snippets commonly used in Beckman projects.
Use
The C# snippets are mostly standalone code generators. Simply type the snippet shortcut and hit Tab
twice to autogenerate the code defined in the snippet.
The HTML element snippets are designed to surround a selection, as when converting text pasted from a word document. Select the text you wish to wrap, press ctrl+k, ctrl+s
to open the surround dialog, navigate to the appropriate snippet, and press Tab
to wrap the selection in an HTML element.
Common Installation
- In visual studio, open Tools > Options.
- Click Extensions and Updates, and scroll to the Additional Extension Galleries section.
- Click Add. Change Name to "Beckman Private Gallery", and URL to
file:///<X>:/<PathToGallery>/VisualStudioExtensions/atom.xml
. Click Apply. - Open Tools > Extensions and Updates.
- Expand the Online galleries. You should see a Beckman gallery with an update to the snippets extension.
Manual Installation
- Clone this project and build in Visual Studio.
- In File Explorer, navigate to /Beckman.Snippets/bin/Release/.
- Double-click the Beckman.Snippets.vsix file and follow the installation instructions.
Updating the Extension
- Add new snippet.
- Update version number in source.extension.vsixmanifest.
- Note change in ReleaseNotes.txt
- Build project using Release configuration.
- Copy Beckman.Snippets.vsix file from bin/Release/ to gallery directory.
- Update atom.xml. This will have to be done by hand until we have a real distribution mechanism.
Known Issues
ReSharper uses its own template language and overrides Visual Studio's Intellisense defaults. If using ReSharper, either live without intellisense prompts for these snippets, rewrite the snippets as ReSharper live templates, or tell ReSharper to use Visual Studio settings for snippet Intellisense.
Updating the Gallery Feed
VSIX templates are distributed via Visual Studio Gallery feeds, not NuGet package. See Shipping Visual Studio Extensions and Shipping Visual Studio Snippets in an Extension for more information.
- Add or edit your snippet.
- Update ReleaseNotes.txt.
- In Visual Studio's Solution Explorer, open source.extension.vsixmanifest and update the version number.
- Merge to master and tag the merge commit with the new version number.
- Build your solution.
- Copy the new
.vsix
file fromBeckman.Snippets/bin/Debug/
to the private nuget feed and update the atom.xml file for the feed.