Nuget 1.6 is released along with breaking changes

First for some back ground. I’ve found the development story of creating nuget packages to be a bit rough. This is the development story I’ve come up with. In the root of my solutions that will build nuget packages I place Nuget.exe the command line executable. (I commit this to hg and keep it in solution)

Following that any project that needs to build itself as a package, I create a nugget.cmd in the project root. This is an example of what my nugget.cmd would look like:

_ SOLUTION_\Nuget.exe pack _ PROJECT_\myProj.csproj -Configuration Release -Verbose -OutputDirectory .\bin\

This works very well as I can right click the project from the solution explorer and Open Command Prompt then just run nugget.cmd. I believe Open Command Prompt  comes from the PowerCommands for VS VSIX extension.

Enter today, I updated the Nuget.exe to 1.6 using “Nuget.exe update” went to run my nugget.cmd and was presented with:

Unknown option: ‘-Configuration’

The migration path to this is to update your build scripts to behave as:

Nuget.exe pack _ PROJECT_\myProj.csproj  -Build -Verbose -OutputDirectory .\bin\ -Properties Configuration=Release

Another breaking change that I encountered is if you use the replacement tokens with nuget such that your nuspec file contains


The $version$ property will no longer properly read your AssemblyInfo version attribute. After upgrading to 1.6 and building my project it would just result in 1.0 instead of the correct version. I had to set the specific version in the nuspec file to overcome this. I opened issue #1777 on Codeplex for nuget about this as this seems like a bug.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s