.Net Core Assembly Patching - Package version

Rgomez's Avatar

Rgomez

24 Oct, 2018 09:47 PM

When I set in VS2017 the "package version" of a .NET Core and activate the nuget creation on build I get a package ending in the value setted in "package version".

This value is also setted as [assembly: System.Reflection.AssemblyInformationalVersionAttribute("{package-version}")].

Now my question:

When I use for ex:

dotnet_csproj:
  patch: true
  file: '**\*.csproj'
  version: '1.2.25'
  package_version: '1.2.25.build35-develop'
  assembly_version: '1.2.25'
  file_version: '1.2.25'

I expect to get a nuget package ending in 1.2.25.build35-develop.nupkg and a [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.2.25.build35-develop")], but I get a package ending in 1.2.25.nupkg and a [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.2.25")]

So where is the `package-value` used? Or I am using it wrong?

  1. 1 Posted by Rgomez on 24 Oct, 2018 09:51 PM

    Rgomez's Avatar

    When I set in VS2017 the package-version of a .NET Core and activate the nuget creation on build I get a package ending in the value setted in package-version.

    This value is also setted as [assembly: System.Reflection.AssemblyInformationalVersionAttribute("{package-version}")].

    Now my question:

    When I use for ex:

    dotnet_csproj: 
      patch: true 
      file: '**\*.csproj' 
      version: '1.2.25' 
      package_version: '1.2.25.build35-develop' 
      assembly_version: '1.2.25' 
      file_version: '1.2.25'
    

    I expect to get a nuget package ending in 1.2.25.build35-develop.nupkg and a [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.2.25.build35-develop")], but I get a package ending in 1.2.25.nupkg and a [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.2.25")]

    So where is the package-value used? Or I am using it wrong?

  2. Support Staff 2 Posted by Owen McDonnell on 24 Oct, 2018 10:43 PM

    Owen McDonnell's Avatar

    I believe package_version is used for nuget packaging. Try to omit it and put the intended version under version: key.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac