Octo pack using csproj VersionPrefix value

(Joe Vaughan) #1

Hi,

Is there a way I can have Octo.exe pack use the VersionPrefix / Version value defined in my project’s csproj? I understand that the pack command operates on already published files, but I’m not too sure how to integrate versioning into this process so perhaps there is something I’m missing.

I see Octo.exe pack as a viable replacement for dotnet pack for Web applications, especially considering dotnet pack does not support web applications (Setting IsPackable to false in websdk) and the Octopus Deploy documentation recommends it for .NET Core deployments.

I’m ultimately trying to avoid repeating version numbers in my project, build server, and Octopus Deploy server and using variables at each stage.

Appreciate any guidance you can offer.

(Matthew Casperson) #2

Hi @jvaughan, thanks for reaching out.

Octo.exe pack does not have any facility to inspect a csproj file for version information. This command is designed to be a way to generate generic archives from a directory, but has no additional understanding of the project structure that may be in the directory. In that sense Octo.exe pack is much like a plain zip tool.

The only way I can see to have Octo.exe pack use a version number from a project file is to script up the extraction of the version from the csproj file, or reuse a common version variable from a CI tool, and pass it then as a command line argument.

Regards
Matt C

(Joe Vaughan) #3

Hi Matt,

Thanks for your response, I figured that this was the case. I’ll probably look at additionally tooling such a Cake to integrate the entire end to end process of our builds.

Cheers.

(system) closed #4

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.