Skip to content

Invalid comparisons in prop and csproj files #3297

@keegan-caruso

Description

@keegan-caruso

Microsoft.Identity.Web Library

Microsoft.Identity.Web

Microsoft.Identity.Web version

main branch

Web app

Not Applicable

Web API

Not Applicable

Token cache serialization

Not Applicable

Description

For example:

<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == 'NET6_0_OR_GREATER'">

This is incorrect. To check for something like this, use this syntax:

  <PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">

This is part of why the library is not AOT compatible.

A search over the repo shows a few of these errors: https://github.com/search?q=repo%3AAzureAD%2Fmicrosoft-identity-web%20TargetFrameworkIdentifier&type=codeNA

Reproduction steps

NA

Error message

No response

Id Web logs

No response

Relevant code snippets

NA

Regression

No response

Expected behavior

Comparisons should be valid.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions