Skip to content

Commit 3a86df6

Browse files
committed
Scope setting warning level to when AOT is enabled.
1 parent dcb9542 commit 3a86df6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Windows.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Copyright (c) .NET Foundation. All rights reserved.
5050
<CsWinRTAotOptimizerEnabled Condition="'$(CsWinRTAotOptimizerEnabled)' == '' and $([MSBuild]::GetTargetFrameworkVersion('$(TargetFramework)')) >= 6">true</CsWinRTAotOptimizerEnabled>
5151
<CsWinRTAotExportsEnabled Condition="'$(CsWinRTAotExportsEnabled)' == '' and '$(CsWinRTAotOptimizerEnabled)' == 'true' and '$(PublishAot)' == 'true'">true</CsWinRTAotExportsEnabled>
5252
<CsWinRTCcwLookupTableGeneratorEnabled Condition="'$(CsWinRTCcwLookupTableGeneratorEnabled)' == '' and '$(CsWinRTGenerateProjection)' != 'true'">true</CsWinRTCcwLookupTableGeneratorEnabled>
53-
<CsWinRTAotWarningLevel Condition="'$(CsWinRTAotWarningLevel)' == '' and '$(CsWinRTGenerateProjection)' != 'true'">1</CsWinRTAotWarningLevel>
53+
<CsWinRTAotWarningLevel Condition="'$(CsWinRTAotWarningLevel)' == '' and '$(CsWinRTGenerateProjection)' != 'true' and ('$(PublishAot)' == 'true' or '$(IsAotCompatible)' == 'true')">1</CsWinRTAotWarningLevel>
5454
</PropertyGroup>
5555

5656
<ItemGroup Condition="'$(IncludeWindowsSDKRefFrameworkReferences)' == 'true'">

0 commit comments

Comments
 (0)