[release/8.0.4xx] Add CompilerVisibleProperty needed for analyzer in Windows SDK projection #42666
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Our latest update to the Windows SDK projection package
Microsoft.Windows.SDK.NET.Ref
in the installer repo contains an analyzer that needs access to a couple MSBuild properties. To allow that, this PR sets the default for these properties and exposes them to the analyzer usingCompilerVisibleProperty
. This is only done in the scenarios when our package gets included as determined byIncludeWindowsSDKRefFrameworkReferences
being set to true (i.e. someone targeting net8.0-windows10.0.22621.0 or similar Windows OS version TFM).Customer Impact
The impact is without this PR, the analyzer will just use the defaults and prevent consumers from being able to configure the behavior without themselves adding
CompilerVisibleProperty
. And without the analyzer itself, they will not get the improvements that have been made for this scenario to be AOT compatible which the upcoming WindowsAppSDK release is relying on.Regression
No, our package didn't include an analyzer in the past.
Testing
For the changes in this PR itself, these are only setting defaults on scenario specific properties when not set and just declaring them as exposed to an analyzer.
But for in general together with the projection package update, these changes have been in public preview for the last 2 months and have been exercised as part of public WindowsAppSDK 1.6 experimental and preview releases. In those preview releases, a reference to the
Microsoft.Windows.CsWinRT
package was required which set the equivalent but for the stable release we are putting those changes here as developers don't typically reference that package unless they are a component owner building a projection.Risk
These changes are just exposing scenario specific properties, so are low risk. And overall, the projection package and these properties are only set when the Windows OS version specific TFM is used (i.e. net8.0-windows10.0.22621.0 or similar).