Skip to content

Fix IsRidAgnostic fallback logic#8002

Merged
Forgind merged 2 commits intodotnet:mainfrom
dsplaisted:fix-rid-agnostic
Sep 28, 2022
Merged

Fix IsRidAgnostic fallback logic#8002
Forgind merged 2 commits intodotnet:mainfrom
dsplaisted:fix-rid-agnostic

Conversation

@dsplaisted
Copy link
Copy Markdown
Member

Fixes #7995

Context

#6924 changed how IsRidAgnostic works. Normally, the .NET SDK should set the IsRidAgnostic property (added in dotnet/sdk#21986). But when using an older version of the .NET SDK, there is fallback logic in the GetTargetFrameworksWithPlatformForSingleTargetFramework target to replicate the previous logic.

However, this fallback logic was incorrect, as it was setting item metadata, but reading from the property to determine whether to set it to the default value. So if the property wasn't set, the IsRidAgnostic metadata would always be false.

Testing

Manual testing

@dsplaisted dsplaisted requested review from a team and rainersigwald September 22, 2022 18:45
Copy link
Copy Markdown
Contributor

@Forgind Forgind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I was confused last time as far as at what point the $(IsRidAgnostic) is used to set %(IsRidAgnostic). Can you update the comment to be clearer on at what point that happens?

@rainersigwald rainersigwald added this to the VS 17.4 milestone Sep 26, 2022
@rainersigwald rainersigwald added the merge-when-branch-open PRs that are approved, except that there is a problem that means we are not merging stuff right now. label Sep 26, 2022
@dsplaisted
Copy link
Copy Markdown
Member Author

@Forgind

I think I was confused last time as far as at what point the $(IsRidAgnostic) is used to set %(IsRidAgnostic). Can you update the comment to be clearer on at what point that happens?

$(IsRidAgnostic) refers to a property and %(IsRidAgnostic) refers to item metadata. I've updated the comment to try to make it more clear.

@dsplaisted
Copy link
Copy Markdown
Member Author

@dotnet/msbuild I pushed a new commit that only updated a comment and now a test failed in one leg

@Forgind Forgind merged commit 6fb9765 into dotnet:main Sep 28, 2022
@Forgind
Copy link
Copy Markdown
Contributor

Forgind commented Sep 28, 2022

@dsplaisted, we're going to need M2 approval for this, so be ready to solicit it when we have an insertion PR.

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

Labels

merge-when-branch-open PRs that are approved, except that there is a problem that means we are not merging stuff right now.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update vs to Version 17.4.0 Preview 2.0 from PREVIEW 1 cause errors in publish worker service

3 participants