Skip to content

Instantly share code, notes, and snippets.

@xavierdecoster
Created May 6, 2012 13:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xavierdecoster/2622359 to your computer and use it in GitHub Desktop.
Save xavierdecoster/2622359 to your computer and use it in GitHub Desktop.
Readme file for NuSpec v1.2.0
# NuSpec
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 <code>-EnablePackageBuild</code> swicth to automatically build the nuget package when building the project.
## Auto-pushing the package and symbols
Enable-PackagePush <ProjectName>
Will install a <code>NuGet.Extensions.targets</code> MSBuild file and set the <code>&lt;PushPackage&gt;true&lt;/PushPackage&gt;</code> MSBuild property in the target project(s).
You can tweak **package versioning** in the <code>MSBuild.ExtensionPack.VersionNumber.targets</code> file, located under <code>$(SolutionDir)\.nuget\MSBuildExtensionPack</code>.
*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 <code>NuGet.Extensions.targets</code> 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*.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment