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:


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.

Octopus Deploy is used by thousands of developers across the globe, from small companies to large enterprises. Find out if it meets your deployment automation needs by taking advantage of our free 30-day trial. You can spin up an instance with just a few clicks!

New Releases RFC