Skip to content

Commit

Permalink
Add escape switch for TargetPlatform and SupportedOS attributes (#29698)
Browse files Browse the repository at this point in the history
  • Loading branch information
ViktorHofer committed Jan 2, 2023
1 parent dde4047 commit a5ee32e
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ Copyright (c) .NET Foundation. All rights reserved.
<IncludeSourceRevisionInInformationalVersion Condition="'$(IncludeSourceRevisionInInformationalVersion)' == ''">true</IncludeSourceRevisionInInformationalVersion>
<GenerateInternalsVisibleToAttributes Condition="'$(GenerateInternalsVisibleToAttributes)' == ''">true</GenerateInternalsVisibleToAttributes>
<GenerateRequiresPreviewFeaturesAttribute Condition="'$(GenerateRequiresPreviewFeaturesAttribute)' == '' and '$(IsNetCoreAppTargetingLatestTFM)' == 'true'">true</GenerateRequiresPreviewFeaturesAttribute>
<GenerateTargetPlatformAttribute Condition="'$(GenerateTargetPlatformAttribute)' == ''">true</GenerateTargetPlatformAttribute>
<GenerateSupportedOSPlatformAttribute Condition="'$(GenerateSupportedOSPlatformAttribute)' == ''">true</GenerateSupportedOSPlatformAttribute>
</PropertyGroup>

<!--
Expand Down Expand Up @@ -122,7 +124,8 @@ Copyright (c) .NET Foundation. All rights reserved.
</AssemblyAttribute>
</ItemGroup>

<ItemGroup Condition="'$(TargetPlatformIdentifier)' != ''
<ItemGroup Condition="'$(GenerateTargetPlatformAttribute)' == 'true'
and '$(TargetPlatformIdentifier)' != ''
and '$(TargetPlatformVersion)' != ''
and '$(TargetFrameworkIdentifier)' == '.NETCoreApp'
and $([MSBuild]::VersionGreaterThanOrEquals($(_TargetFrameworkVersionWithoutV), '5.0'))">
Expand All @@ -131,7 +134,8 @@ Copyright (c) .NET Foundation. All rights reserved.
</AssemblyAttribute>
</ItemGroup>

<ItemGroup Condition="'$(TargetPlatformIdentifier)' != ''
<ItemGroup Condition="'$(GenerateSupportedOSPlatformAttribute)' == 'true'
and '$(TargetPlatformIdentifier)' != ''
and '$(SupportedOSPlatformVersion)' != ''
and '$(TargetFrameworkIdentifier)' == '.NETCoreApp'
and $([MSBuild]::VersionGreaterThanOrEquals($(_TargetFrameworkVersionWithoutV), '5.0'))">
Expand Down

0 comments on commit a5ee32e

Please sign in to comment.