My collection of home-made NuGet packages
Pull request Compare This branch is 8 commits behind MyGet:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Our collection of home-made NuGet packages :)


Simply run Install-Package NuSpec (once for the solution, doesn't matter which project) to get a set of extra cmdlets available in the NuGet Package Manager Console. The cmdlets in this package rely on the NuGet "Enable Package Restore" feature, which adds a .nuget folder in the solution directory containing the nuget.exe command line tool and nuget.targets MSBuild file.

Available cmdlets: Install-NuSpec, Enable-PackagePush

Creating the package and auto-build

Install-NuSpec <ProjectName> [-EnablePackageBuild]

Adds a tokenized .nuspec file to the target project(s). Use the -EnablePackageBuild swicth to automatically build the nuget package when building the project.

Auto-pushing the package and symbols

Enable-PackagePush <ProjectName>

Will install a NuGet.Extensions.targets MSBuild file and set the <PushPackage>true</PushPackage> MSBuild property in the target project(s).

You can tweak package versioning in the MSBuild.ExtensionPack.VersionNumber.targets file, located under $(SolutionDir).nuget\MSBuildExtensionPack. This is based on the MSBuild ExtensionPack SetVersionNumber target.

Don't forget to set the target feed URL for the packages and symbols, including the API key, in the NuGet.Extensions.targets file.

Done? Remove the dependency...

There's not much value in keeping the NuSpec package dependency around after setting up this automation, so feel free to simply remove it using Uninstall-Package NuSpec.