Skip to content

ProductVersion property's meaning is ambiguous  #48341

Open

Description

@ViktorHofer

<ProductVersion /> is defined centrally in the Versions.props file and is currently set to 6.0.0:

<!-- The .NET product branding version -->
<ProductVersion>6.0.0</ProductVersion>

In addition to that, installer defines the <ProductVersion /> property as well which means the central one is overwritten:

<ProductVersion>$(ProductionVersion)$(ProductVersionSuffix)</ProductVersion>

The Arcade SDK itself doesn't know anything about <ProductVersion /> but the Installers package in Arcade does, i.e.: https://github.com/dotnet/arcade/blob/55c2f07346757ddc6f1fa569b2de6506b3fdea2a/src/Microsoft.DotNet.Build.Tasks.Installers/build/bundle.targets#L151

We should clarify which of the the property values the Installers package in Arcade expects (my guess is the one provided by the installer subset) and possibly depend on a different on a different property in that package. In addition to that my assumption is that more of the properties next to <ProductVersion /> in the installers subset can be cleaned-up and consolidated with the rest of the repo and don't need to reside inside a target anymore.

Related: #48229

cc @dotnet/runtime-infrastructure

Activity

  1. added this to the 6.0.0 milestone on Feb 16, 2021
  2. ghost added
    untriaged
    on Feb 16, 2021
  3. safern commented on Feb 16, 2021

    @safern
    Member

    IIRC ProductVersion under installer is what drives the produced package versions, we should update that to use the same mechanism as we use for other packages which is based of arcade properties.

  4. removed
    untriaged
    on Feb 16, 2021
  5. jkoritzinsky commented on Feb 16, 2021

    @jkoritzinsky
    Member

    ProductVersion in installer is driven by the Arcade properties, but it has to add additional information to get the installer versions to match what they're supposed to for the given platform installer (like using a ~ instead of a - in deb package versions).

  6. added
    help wanted
    on Feb 21, 2021
  7. am11 commented on Feb 21, 2021

    @am11
    Member

    The customization around AppHostVersion, HostPolicyVersion and friends having different values during a single build seems to be unused/untested in practice (at least going by the public-facing CI scripts). If that also holds true for official builds and source-build scenarios, then we could define just one derived property (e.g. DotnetProductVersion) in eng/Versions.props and delete GetProductVersions target. That will allow us to also cleanup a handful of other stuff (msbuild, cmake and shell scripts, pipeline yaml files) around these customizations.

  8. jkoritzinsky commented on Feb 21, 2021

    @jkoritzinsky
    Member

    For those properties, I think @dagood and @vitek-karas are the most likely to know their intended usage. Their regular usage predates me.

  9. dagood commented on Feb 22, 2021

    @dagood
    Member

    They predate me, too. I think the comment explains it well:

    <!--
    By default, we are always building the nuget packages for HostPolicy, HostFXR and
    Dotnet/AppHost. Thus, the "UseShipped*" properties (below) are always set to false.
    However, there are scenarios when some of these components will not change (e.g. during
    servicing, we may only change HostPolicy but not HostFXR and Dotnet/AppHost). In such cases,
    set the appropriate "UseShipped*" property below to true and the corresponding "*Version"
    property to the desired version so that we use the last shipped version of the package.
    -->
    <!-- The host/apphost package versions are only updated whenever there is a change in the components -->
    <UseShippedHostPackage>false</UseShippedHostPackage>
    <HostVersion Condition="'$(UseShippedHostPackage)' != 'true'">$(ProductVersion)</HostVersion>
    <HostVersion Condition="'$(UseShippedHostPackage)' == 'true'">2.0.0</HostVersion>

    AFAIK we never used this feature--rebuilding the host-related packages every servicing release never ended up being considered worth preventing, I suppose.

    @NikolaMilosavljevic may be able to dig in more.

  10. ViktorHofer commented on Feb 22, 2021

    @ViktorHofer
    MemberAuthor

    Thanks Davis. I don't think there is any harm in keeping this incremental servicing infrastructure as long we can derive the properties from something that is available at evaluation time outside of a target and based on Arcade's version properties.

  11. self-assigned this
    on Feb 22, 2021
  12. am11 commented on Feb 22, 2021

    @am11
    Member

    at evaluation time outside of a target

    I was experimenting a bit and it seems like it would require us to move VersionSuffix calculation out of https://github.com/dotnet/arcade/blob/ca7fab569267ed3bc73360882d652d119aae5653/src/Microsoft.DotNet.Arcade.Sdk/tools/Version.BeforeCommonTargets.targets

    The rest of the *Version calculations can be done statically in runtime/Directory.Build.props, after importing the Arcade SDK's props.

  13. ViktorHofer commented on Feb 22, 2021

    @ViktorHofer
    MemberAuthor

    I'm currently also experimenting on it locally and am in a pretty good state. Based on the Version in most cases only be read in target files or from within targets or in ItemGroups, moving out VersionSuffix shouldn't be necessary. I'll probably create a draft PR this week with my progress.

  14. removed their assignment
    on Aug 6, 2021
  15. modified the milestones: 6.0.0, 7.0.0 on Aug 6, 2021
  16. akoeplinger commented on Jul 14, 2026

    @akoeplinger
    Member

    writing down here if someone starts working on this at some point: looks like ProductVersion is also set by https://github.com/dotnet/sdk/blob/5ef6b4b9d2a2de6ad3a6e3b2e9ef64e5ba08ed8e/src/Layout/redist/targets/GenerateMSIs.targets#L66-L72 in the dotnet/sdk repo which in turn will get used by arcade's Microsoft.DotNet.Build.Tasks.Installers so we need to coordinate any changes to that

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-Infrastructure-installerhelp wanted

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions