SolutionSnippets 1.0.4
dotnet add package SolutionSnippets --version 1.0.4
NuGet\Install-Package SolutionSnippets -Version 1.0.4
<PackageReference Include="SolutionSnippets" Version="1.0.4" />
paket add SolutionSnippets --version 1.0.4
#r "nuget: SolutionSnippets, 1.0.4"
// Install SolutionSnippets as a Cake Addin #addin nuget:?package=SolutionSnippets&version=1.0.4 // Install SolutionSnippets as a Cake Tool #tool nuget:?package=SolutionSnippets&version=1.0.4
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: http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/4152530-add-the-ability-to-refresh-individual-or-all-snipp
Send feedback, feature-request, unexpected breaking changes, bugs, etc. via the projects nuget-page, https://www.nuget.org/packages/SolutionSnippets/ContactOwners, until there is a projet homepage...
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
GitHub repositories
This package is not used by any popular GitHub repositories.
1.0.4 - Solution-specific directories are not deleted anymore. Only deployed snippets are deleted instead. Deleting the entire Directory sometimes raised an error during build.
1.0.3 - Added BuildServer-Support where no VisualStudioLocation-msbuildvaraible has been set. Snippet-deployment is skipped in this scenario
1.0.2 - version alignment
1.0.1 - *.snippet files under the "packages" folder of the solution will be ignored
1.0.0 - initial release