Pack target appends PackageVersion property with VersionSuffix #4324

Closed
natemcmaster opened this Issue Jan 18, 2017 · 0 comments

Comments

Projects
None yet
3 participants
@natemcmaster

Repro:
Install NuGet 4.0.0-rc3
Create a csproj with these settings

  <PropertyGroup>
    <VersionPrefix>1.2.0</VersionPrefix>
    <VersionSuffix>rtm-build001</VersionSuffix>
    <PackageVersion>1.2.0</PackageVersion>
  </PropertyGroup>

Execute both msbuild /t:GenerateNuspec and msbuild /t:Pack

Expected:
I would have expected the explicit value of PackageVersion to override the VersionPrefix/VersionSuffix values. Both the generated .nuspec file and the packaged .nupkg file are created with the version = "1.2.0".

Actual
Generated nuspec (in obj/ folder) has version = 1.2.0, but the nupkg will be version = 1.2.0-rtm-build001

More details
We are trying to produce packages using Microsoft.NET.Sdk that will have the AssemblyInformationalVersionAttribute set to include a build number (1.2.0-rtm-build001), but want the package version to exclude the version suffix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment