July 11, 2012

OctoPack now supports assembly versions

When using OctoPack, the NuGet package that was built would default to version 1.0.0. This could be overridden from the MSBuild command line by passing:

/p:OctopusPackageVersion=2.0.0

This works nicely when using a build tool that generates version numbers, since you can usually pass the parameter to MSBuild.

An issue was opened on GitHub some time ago to add support for this:

[assembly: AssemblyVersion("1.0.*")]

I didn't know of a way to do this without adding a custom task to work it out, but André posted an example using the GetAssemblyIdentity MSBuild task. Thanks to André, OctoPack 1.0.99 will now read the version number from the primary output assembly, if it isn't overridden by passing /p:OctopusPackageVersion from the command line.

You can view the diff on GitHub.

New Releases RFC

Welcome! We use cookies and data about how you use our website allow us to improve the website and your experience, and resolve technical errors. Our website uses cookies and shares some of your data with third party analytics companies for these purposes.

If you decline, we will respect your privacy. A single cookie will be used in your browser to remember your preference.