Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use $(TargetFrameworkIdentifier) and $(TargetFrameworkVersion) consistently #25428

Merged
merged 1 commit into from
Aug 31, 2020

Conversation

dougbu
Copy link
Member

@dougbu dougbu commented Aug 30, 2020

  • always use $([MSBuild]::VersionXYZ(...)) for version checks
  • use $(NETCoreAppFrameworkIdentifier) where it's available
  • move $(KnownAppHostPackOrFrameworkReferenceTfm) setting to Directory.Build.props

nits:

  • do not assume $(TargetFrameworkVersion) starts with a 'v'; valid w/o it
  • add $(_IsMicrosoftNETCoreApp20OrOlder) property in OpenAPI targets file
    • evaluate the Condition once instead of three times

…nsistently

- always use `$([MSBuild]::VersionXYZ(...))` for version checks
- use `$(NETCoreAppFrameworkIdentifier)` where it's available
- move `$(KnownAppHostPackOrFrameworkReferenceTfm)` setting to Directory.Build.props
  - use it to correct `@(KnownFrameworkReference)` updates
  - metadata of those items still uses `netcoreapp5.0`
  - see also dotnet/efcore#22279 (comment)

nits:
- do not assume `$(TargetFrameworkVersion)` starts with a 'v'; valid w/o it
- add `$(_IsMicrosoftNETCoreApp20OrOlder)` property in OpenAPI targets file
  - evaluate the `Condition` once instead of three times
@dougbu dougbu requested review from pranavkm and a team August 30, 2020 21:00
@Pilchie Pilchie added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Aug 31, 2020
@dougbu dougbu merged commit 1f84e28 into release/5.0 Aug 31, 2020
@dougbu dougbu deleted the dougbu/knownreferences branch August 31, 2020 18:36
dougbu added a commit to dougbu/razor-compiler that referenced this pull request Nov 17, 2021
…nsistently (dotnet/aspnetcore#25428)

- always use `$([MSBuild]::VersionXYZ(...))` for version checks
- use `$(NETCoreAppFrameworkIdentifier)` where it's available
- move `$(KnownAppHostPackOrFrameworkReferenceTfm)` setting to Directory.Build.props
  - use it to correct `@(KnownFrameworkReference)` updates
  - metadata of those items still uses `netcoreapp5.0`
  - see also dotnet/efcore#22279 (comment)

nits:
- do not assume `$(TargetFrameworkVersion)` starts with a 'v'; valid w/o it
- add `$(_IsMicrosoftNETCoreApp20OrOlder)` property in OpenAPI targets file
  - evaluate the `Condition` once instead of three times

Commit migrated from dotnet/aspnetcore@1f84e28882da
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants