Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Windows SDK projection for testing #25781

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

manodasanW
Copy link

Description of Change

PR for testing latest Windows SDK projection package

Issues Fixed

Fixes #

@manodasanW manodasanW requested a review from a team as a code owner November 12, 2024 00:07
@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Nov 12, 2024
Copy link
Contributor

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.

@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
Contributor

@jsuarezruiz jsuarezruiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]
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]
    9387 Warning(s)
    2 Error(s)

@rmarinho rmarinho requested review from mattleibow and removed request for Eilon November 13, 2024 00:59
@rmarinho
Copy link
Member

@mattleibow you remember anything about getting this working ?

@manodasanW
Copy link
Author

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>

@manodasanW
Copy link
Author

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.

@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@manodasanW
Copy link
Author

I believe the current breaks are due to

<ItemGroup Condition=" '$(_MauiTargetPlatformIsAndroid)' != 'True' ">
is getting imported before Directory.Build.targets runs as it is explicitly imported by the csproj.

@mattleibow
Copy link
Member

Why were all the props moved to the targets file?

@manodasanW
Copy link
Author

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.

@@ -20,7 +20,7 @@
</ItemGroup>

<PropertyGroup>
<WindowsSdkPackageVersion>10.0.19041.44</WindowsSdkPackageVersion>
<WindowsSdkPackageVersion>10.0.19041.56</WindowsSdkPackageVersion>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why it can t be 10.0.19041.57 ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can make that them 57 too, it probably was different versions before due to not having the SDK profile changes. But for testing purposes here, 56 or 57 here are fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community ✨ Community Contribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants