Below are the steps taking place
- OctoPack: Attempting to build package from 'MySoltuion.MyProject.nuspec'.
- OctoPack: Successfully created package
'C:\pathToMySolution\MyProject\obj\octopacked\MyProject.2018.03.26.6654.nupkg'. - OctoPack: OctoPack successful
I want to get the version i.e 2018.03.26.6654.
FYI, I don't need my assembly version
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
Any help is appreciated, thanks
OctoPack cannot resolve the tokens in the nuspec from the project file (unfortunately). Only from the build parameters (OctoPackNuGetProperties).
See: UsingOctoPack-Replacementtokens
I am not sure myself if I will switch to a script with nuget to pack and push, so I can have the token replacements from the project file.
Btw.: It does work if you do not have a nuspec file, and Octopack generates one from the csproj file. But I would like to have my own nuspec, with a valid project url, dependencies, etc.