Skip to content

Commit bea802e

Browse files
authored
[release/8.0.3xx] Add CompilerVisibleProperty needed for analyzer in Windows SDK projection (#42665)
2 parents 3ece0df + bc2eafb commit bea802e

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,24 @@ Copyright (c) .NET Foundation. All rights reserved.
4545
<TargetPlatformMinVersion Condition="'$(TargetPlatformMinVersion)' == ''">$(TargetPlatformVersion)</TargetPlatformMinVersion>
4646
</PropertyGroup>
4747

48+
<!-- Used by analyzers in the Microsoft.Windows.SDK.NET.Ref package. -->
49+
<PropertyGroup Condition="'$(IncludeWindowsSDKRefFrameworkReferences)' == 'true'">
50+
<CsWinRTAotOptimizerEnabled Condition="'$(CsWinRTAotOptimizerEnabled)' == '' and $([MSBuild]::GetTargetFrameworkVersion('$(TargetFramework)')) >= 6">true</CsWinRTAotOptimizerEnabled>
51+
<CsWinRTAotExportsEnabled Condition="'$(CsWinRTAotExportsEnabled)' == '' and '$(CsWinRTAotOptimizerEnabled)' == 'true' and '$(PublishAot)' == 'true'">true</CsWinRTAotExportsEnabled>
52+
<CsWinRTCcwLookupTableGeneratorEnabled Condition="'$(CsWinRTCcwLookupTableGeneratorEnabled)' == '' and '$(CsWinRTGenerateProjection)' != 'true'">true</CsWinRTCcwLookupTableGeneratorEnabled>
53+
<CsWinRTAotWarningLevel Condition="'$(CsWinRTAotWarningLevel)' == '' and '$(CsWinRTGenerateProjection)' != 'true' and ('$(PublishAot)' == 'true' or '$(IsAotCompatible)' == 'true')">1</CsWinRTAotWarningLevel>
54+
</PropertyGroup>
55+
56+
<ItemGroup Condition="'$(IncludeWindowsSDKRefFrameworkReferences)' == 'true'">
57+
<CompilerVisibleProperty Include="CsWinRTAotOptimizerEnabled" />
58+
<CompilerVisibleProperty Include="CsWinRTAotExportsEnabled" />
59+
<CompilerVisibleProperty Include="CsWinRTRcwFactoryFallbackGeneratorForceOptIn" />
60+
<CompilerVisibleProperty Include="CsWinRTRcwFactoryFallbackGeneratorForceOptOut" />
61+
<CompilerVisibleProperty Include="CsWinRTCcwLookupTableGeneratorEnabled" />
62+
<CompilerVisibleProperty Include="CsWinRTMergeReferencedActivationFactories" />
63+
<CompilerVisibleProperty Include="CsWinRTAotWarningLevel" />
64+
</ItemGroup>
65+
4866
<Target Name="_ErrorOnUnresolvedWindowsSDKAssemblyConflict"
4967
AfterTargets="ResolveAssemblyReferences"
5068
Condition=" '@(ResolveAssemblyReferenceUnresolvedAssemblyConflicts)' != '' ">

0 commit comments

Comments
 (0)