1

I have a nuspec file with information about the nuget package, it also contains a version.

Is it possible to make OctoPack use the version that is specified inside the nuspec file? Right now it automatically takes the date.

I already tried the OctoPackNuSpecFileName parameter but it does not take over the version from my nuspec file.

nuspec file:

<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
  <metadata>
    <id>Tc_Oct_App</id>
    <title>Tc_Oct_App</title>
    <version>1.0.0</version>
    <authors>Rick</authors>
    <owners>Rick</owners>
    <licenseUrl>http://yourcompany.com</licenseUrl>
    <projectUrl>http://yourcompany.com</projectUrl>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
        <description>A sample angular project</description>
    <releaseNotes>This release contains the following changes...</releaseNotes>
  </metadata>
</package>

My output is Tc_Oct_App.Release.2017.8.9.134639.nupkg.

Rick
  • 1,224
  • 3
  • 13
  • 27

1 Answers1

0

The package version is either taken from a parameter or from the assembly. I guess the date you see is coming from the AssemblyInfo.cs version.

Have you tried passing /p:OctoPackPackageVersion=<version> as an MSBuild parameter?

For more info: Version numbers documentation

Milnev
  • 97
  • 1
  • 5