Skip to content

Commit aeb357b

Browse files
authored
[release/6.0.4xx] Add CompilerVisibleProperty needed for analyzer in Windows SDK projection (#42655)
2 parents 81560bf + f84eaa2 commit aeb357b

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,23 @@ 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+
</PropertyGroup>
54+
55+
<ItemGroup Condition="'$(IncludeWindowsSDKRefFrameworkReferences)' == 'true'">
56+
<CompilerVisibleProperty Include="CsWinRTAotOptimizerEnabled" />
57+
<CompilerVisibleProperty Include="CsWinRTAotExportsEnabled" />
58+
<CompilerVisibleProperty Include="CsWinRTRcwFactoryFallbackGeneratorForceOptIn" />
59+
<CompilerVisibleProperty Include="CsWinRTRcwFactoryFallbackGeneratorForceOptOut" />
60+
<CompilerVisibleProperty Include="CsWinRTCcwLookupTableGeneratorEnabled" />
61+
<CompilerVisibleProperty Include="CsWinRTMergeReferencedActivationFactories" />
62+
<CompilerVisibleProperty Include="CsWinRTAotWarningLevel" />
63+
</ItemGroup>
64+
4865
<Target Name="_ErrorOnUnresolvedWindowsSDKAssemblyConflict"
4966
AfterTargets="ResolveAssemblyReferences"
5067
Condition=" '@(ResolveAssemblyReferenceUnresolvedAssemblyConflicts)' != '' ">

0 commit comments

Comments
 (0)