NuGet Package SolutionSnippets

Snippets on the fly! Manage C# code snippets on solution level

_about this package_

This package will enable you to manage and maintain solution agnostic C# code snippets.

In other words, snippets in a solution will be deployed automatically upon build - so you can manage snippets on a "per solution" basis.
Just drop the *.snippet files that should be availabe to developers of your solution anywhere under the solution folder (excluding files under your solutions "packages" folder).
SolutionSnippets will discover all those files and deploy them into a special folder "__Blue.Utils.SolutionSnippets" to the current user´s snippet folder.
(this would be "{Documents}\Visual Studio 2012\Code Snippets\Visual C#\My Code Snippets\__Blue.Utils.SolutionSnippets", where {Documents} is the local user´s documents library.
This way, SolutionSnippets won´t interfere with already existing snippets.

It is totally sufficient when there is exactly one project within your solution that installs SolutionSnippets, as all snippets-files under your solution folder will be deployed.

All you need to do to deploy your solution agnostic snippets is to start a build.
When building your solution, all existing solution agnostic snippets are removed.
After that, all snippets in the scope of the current solution are deployed to your user´s snippet folder
(remember: SolutionSnippets does not touch any existing snippets)

_under the hood_

There is (sadly) no black magic involved in deploying solution agnostic snippets. The main work is done by common msbuild-tasks. Only resolving the local user´s snippet folder is done by a custom build-task.

_known caveats_

Under certain circumstances Visual Studio does not reflect changes to snippets immediatly. In those cases, just restart the Visual Studio instance.
In the meantime, go vote for this feature:

Send feedback, feature-request, unexpected breaking changes, bugs, etc.

via the projects nuget-page,, until there is a projet homepage...


Version: 1.0.5
Author(s): earloc
Last Update: Friday, September 11, 2015
.NET Fiddle: Create the first Fiddle
NuGet Url:

Install-Package SolutionSnippets
dotnet add package SolutionSnippets
paket add SolutionSnippets
SolutionSnippets Download (Unzip the "nupkg" after downloading)

1 package depend on this package.