Cowboy in the desert.

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.

Loading...