|  | 
| 45 | 45 |         <Recommended>10.0.$([System.Version]::Parse("$(WindowsSdkPackageVersion.Split('-')[0])").Build).$(_MvvmToolkitWindowsSdkPackageRecommendedBuild)</Recommended> | 
| 46 | 46 |       </_MvvmToolkitWindowsSdkPackage> | 
| 47 | 47 | 
 | 
| 48 |  | -      <!-- Otherwise, validate against the framework reference package --> | 
|  | 48 | +      <!-- | 
|  | 49 | +        Otherwise, validate against the framework reference package. We need to check for two different item specs: | 
|  | 50 | +          - "Microsoft.Windows.SDK.NET.Ref": this is the default name for the framework reference for the Windows | 
|  | 51 | +            SDK projections, used on .NET 8 and lower. It includes all Windows APIs, except for XAML. | 
|  | 52 | +          - "Microsoft.Windows.SDK.NET.Ref.Windows": this is the same as bove, except it's the framework reference | 
|  | 53 | +            name that is added by the .NET 9 SDK for projects targeting .NET 8 and above. This specifically includes | 
|  | 54 | +            the "Windows" profile, which only references non-XAML APIs. This change was done for the UWP support for | 
|  | 55 | +            .NET 9, which requires the .NET SDK to also be able to reference XAML types. Those will use a different | 
|  | 56 | +            item spec (ie. "Microsoft.Windows.SDK.NET.Ref.Xaml"). We only need to check the base "Windows" reference. | 
|  | 57 | +      --> | 
| 49 | 58 |       <_MvvmToolkitWindowsSdkPackage | 
| 50 | 59 |         Include="@(ResolvedFrameworkReference)" | 
| 51 |  | -        Condition="'$(WindowsSdkPackageVersion)' == '' AND '@(ResolvedFrameworkReference)' != '' AND '%(Identity)' == 'Microsoft.Windows.SDK.NET.Ref'"> | 
|  | 60 | +        Condition="'$(WindowsSdkPackageVersion)' == '' AND | 
|  | 61 | +                   '@(ResolvedFrameworkReference)' != '' AND | 
|  | 62 | +                   ('%(Identity)' == 'Microsoft.Windows.SDK.NET.Ref' OR '%(Identity)' == 'Microsoft.Windows.SDK.NET.Ref.Windows')"> | 
| 52 | 63 |         <Referenced>%(ResolvedFrameworkReference.TargetingPackVersion)</Referenced> | 
| 53 | 64 |         <Required>10.0.$([System.Version]::Parse("%(ResolvedFrameworkReference.TargetingPackVersion)").Build).$(_MvvmToolkitWindowsSdkPackageMinBuild)</Required> | 
| 54 | 65 |         <Recommended>10.0.$([System.Version]::Parse("%(ResolvedFrameworkReference.TargetingPackVersion)").Build).$(_MvvmToolkitWindowsSdkPackageRecommendedBuild)</Recommended> | 
|  | 
0 commit comments