In my current job we are creating a lot of NuGet packages, and sometimes I have to create the same package a lot of times on my on machine for testing or debug purpose.
This can become somewhat tedious. I need to remember to build the project, packages it and make sure the version number increments, so I can consume the package in another project. Of course
nuget pack ... with the proper parameters will handle most of the tasks, but I need to specify a lot of parameter (build the project, copy to local feed, specify version and so on) and I need to remember increment the version number every time if I want easily consume the package in another project.
As most developers I don’t like to do the same task over and over again so of course I had to create a small PowerShell script to help me out.
In short it does the following:
- Looks for a
.nuspecfile in the current path
- Looks for a corresponding
nupgkin my local NuGet feed
- Figures out the last beta build number and increments it by 1
- Build the project, package it and publish it to my local feed
If it sounds like something you could use feel free to grab it at GitHub.