Open manodasanW opened 1 week ago
Hey there @manodasanW! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.
/azp run
@mattleibow you remember anything about getting this working ?
I took a look at the binlog and it seems the WindowsSdkPackageVersion
set in Directory.Build.Props
is not taking effect in all projects as I would expect. It does take effect for some. I see that in the below property group, _MauiTargetPlatformIsWindows
is actually false even though Compatibility.ControlGallery.WinUI
is targeting the Windows TFM and I do see the correct TFM in the binlog. It seems _MauiTargetPlatformIdentifier
is empty which is what is used to set the property.
I wonder if this is some ordering issue for when the TargetFramework gets populated and the Directory.Build.Props
running.
<PropertyGroup Condition="'$(_MauiTargetPlatformIsWindows)' == 'True'">
<WindowsSdkPackageVersion>10.0.19041.56</WindowsSdkPackageVersion>
</PropertyGroup>
<_MauiTargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</_MauiTargetPlatformIdentifier>
I took an attempt at trying to address the issue where TargetFramework
may not be set yet when Directory.Build.props is run. Not sure if it is going to break anything elsewhere in the cases where it did get set properly but worth seeing what happens in the pipelines.
/azp run
I believe the current breaks are due to https://github.com/dotnet/maui/blob/353f1a3064d256f2d31465ab86259edd78c59cb6/src/MultiTargeting.targets#L26 is getting imported before Directory.Build.targets runs as it is explicitly imported by the csproj.
Why were all the props moved to the targets file?
Why were all the props moved to the targets file?
See this comment. I was basically trying a change to address the issue where TargetFramework wasn't set when Directory.Build.Props got imported for Compatibility.ControlGallery.WinUI causing for those props to be false. It might be we need to continue setting it in the props and then reset it in targets if empty.
/azp run MAUI-public
/rebase
/azp run MAUI-public
CSC : error CS1705: Assembly 'Microsoft.Maui.Graphics' with identity 'Microsoft.Maui.Graphics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'WinRT.Runtime, Version=2.2.0.0, Culture=neutral, PublicKeyToken=99ea127f02d97709' which has a higher version than referenced assembly 'WinRT.Runtime' with identity 'WinRT.Runtime, Version=2.1.0.0, Culture=neutral, PublicKeyToken=99ea127f02d97709' [D:\a\_work\1\s\src\Graphics\samples\GraphicsTester.WinUI.Desktop\GraphicsTester.WinUI.Desktop.csproj] C:\Users\cloudtest\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\buildTransitive\Microsoft.UI.Xaml.Markup.Compiler.interop.targets(841,9): error MSB3073: The command ""C:\Users\cloudtest\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\buildTransitive\..\tools\net6.0\..\net472\XamlCompiler.exe" "D:\a\_work\1\s\artifacts\obj\GraphicsTester.WinUI.Desktop\Release\net9.0-windows10.0.19041.0\win10-x64\\input.json" "D:\a\_work\1\s\artifacts\obj\GraphicsTester.WinUI.Desktop\Release\net9.0-windows10.0.19041.0\win10-x64\\output.json"" exited with code 1. [D:\a\_work\1\s\src\Graphics\samples\GraphicsTester.WinUI.Desktop\GraphicsTester.WinUI.Desktop.csproj] CSC : error CS1705: Assembly 'Microsoft.Maui.Controls' with identity 'Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'WinRT.Runtime, Version=2.2.0.0, Culture=neutral, PublicKeyToken=99ea127f02d97709' which has a higher version than referenced assembly 'WinRT.Runtime' with identity 'WinRT.Runtime, Version=2.1.0.0, Culture=neutral, PublicKeyToken=99ea127f02d97709' [D:\a\_work\1\s\src\Compatibility\ControlGallery\src\WinUI\Compatibility.ControlGallery.WinUI.csproj] CSC : error CS1705: Assembly 'Microsoft.Maui' with identity 'Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'WinRT.Runtime, Version=2.2.0.0, Culture=neutral, PublicKeyToken=99ea127f02d97709' which has a higher version than referenced assembly 'WinRT.Runtime' with identity 'WinRT.Runtime, Version=2.1.0.0, Culture=neutral, PublicKeyToken=99ea127f02d97709' [D:\a\_work\1\s\src\Compatibility\ControlGallery\src\WinUI\Compatibility.ControlGallery.WinUI.csproj] 9436 Warning(s) 4 Error(s)
That is related to the below comment.
I took a look at the binlog and it seems the
WindowsSdkPackageVersion
set inDirectory.Build.Props
is not taking effect in all projects as I would expect. It does take effect for some. I see that in the below property group,_MauiTargetPlatformIsWindows
is actually false even thoughCompatibility.ControlGallery.WinUI
is targeting the Windows TFM and I do see the correct TFM in the binlog. It seems_MauiTargetPlatformIdentifier
is empty which is what is used to set the property.I wonder if this is some ordering issue for when the TargetFramework gets populated and the
Directory.Build.Props
running.<PropertyGroup Condition="'$(_MauiTargetPlatformIsWindows)' == 'True'"> <WindowsSdkPackageVersion>10.0.19041.56</WindowsSdkPackageVersion> </PropertyGroup>
<_MauiTargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</_MauiTargetPlatformIdentifier>
Description of Change
PR for testing latest Windows SDK projection package
Issues Fixed
Fixes #