Skip to content

IdentityModel file version uses wrong base version due to incorrect property override #5508

@mthalman

Description

@mthalman

The IdentityModel DLLs have a file version with the wrong 3rd component (0 instead of 1) -- ignore the diff in the 4th component for this issue:

  • MSFT: FileVersion:8.0.1.50722
  • SB: FileVersion:8.0.0.64245

The source-build project azure-activedirectory-identitymodel-extensions-for-dotnet.proj passes /p:Version=$(AzureActiveDirectoryIdentityModelExtensionsForDotNetReleaseVersion) (which is 8.0.1). However, the IdentityModel repo's build/common.props computes FileVersion from a separate WilsonVersion property, not from Version:

<Version Condition="'$(WilsonVersion)' != ''">$(WilsonVersion)</Version>
...
<FileVersion Condition="'$(WilsonVersion)' != '' and '$(IsCustomPreview)' != 'true'">
    $(WilsonVersion).$(DateFormula)</FileVersion>
<FileVersion Condition="'$(WilsonVersion)' == ''">
    $(WilsonCurrentVersion).$(DateFormula)</FileVersion>

Since the SB build sets Version but not WilsonVersion, the WilsonVersion == '' condition on line 45 fires, using WilsonCurrentVersion (8.0.0) as the base instead of 8.0.1.

Affected DLLs

  • Microsoft.IdentityModel.Abstractions.dll
  • Microsoft.IdentityModel.JsonWebTokens.dll
  • Microsoft.IdentityModel.Logging.dll
  • Microsoft.IdentityModel.Tokens.dll
  • System.IdentityModel.Tokens.Jwt.dll

Proposed Solution

Change azure-activedirectory-identitymodel-extensions-for-dotnet.proj to pass /p:WilsonVersion=$(AzureActiveDirectoryIdentityModelExtensionsForDotNetReleaseVersion) instead of (or in addition to) /p:Version=.... This ensures the repo's build/common.props uses the correct version (8.0.1) as the FileVersion base, since its version logic is keyed off WilsonVersion, not Version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-buildImprovements in source-build's own build process

    Type

    No type

    Projects

    Status

    11.0

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions