-
Notifications
You must be signed in to change notification settings - Fork 437
Pin WindowsSdkPackageVersion #2613
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
base: main
Are you sure you want to change the base?
Conversation
Hi @jfversluis I saw you talking in the standup about this issue, just some minutes ago. I struggled with this. I am not really sure whether it is related. But when I had these two in my project: <WindowsSdkPackageVersion>10.0.19041.41</WindowsSdkPackageVersion>
<!--<WindowsPackageType>None</WindowsPackageType>--> I get this error:
And this is solved when I put this in my project: <!--<WindowsSdkPackageVersion>10.0.19041.41</WindowsSdkPackageVersion>-->
<WindowsPackageType>MSIX</WindowsPackageType> launchSettings.json : Hopefully this is somehow helpful 🙂 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot wasn't able to review any files in this pull request.
Files not reviewed (1)
- Directory.Build.props: Language not supported
@crwsolutions thanks for watching and the suggestion! While in the same area I don't think its related... It might actually even be caused by the Toolkit...? We're building this from the library perspective and you are probably talking about a .NET MAUI app project. Our library doesn't have the concept of MSIX etc. but I'd be curious if we merge this, or maybe if you use the 11.1.1 version I just released if that changes this behavior. If you are willing and able to test that out I'm happy to hear the results! |
Yes, v11.1.1 also fixes it 👍 So about this line: <WindowsSdkPackageVersion>10.0.19041.41</WindowsSdkPackageVersion> I think I added it in the past to resolve some problem, then I upgraded a lot (.net 9 etc), and moved it out to get it working. Can you recommend something? (This is a private project, I just want it to compile and work) |
You probably resolved the same problem only I'm resolving it in the Toolkit now. I'm not sure what I need to recommend? What is the problem you still need help with? The fix I did for 11.1.1 will also go into 11.2.1 (or whatever version we will do next), so that will probably then fix it for you? |
I Checked my history: I think I added it because of this issue: CommunityToolkit/dotnet#923 . But I will leave it out then and hope for the best with a future upgrade. |
Description of Change
Also see #2612, but this one should be merged to main.
This change pins the
WindowsSdkPackageVersion
in theDirectory.Build.props
file to10.0.19041.44
. Additionally, it adds a note about keeping this in sync with .NET MAUI.When we don't do that, depending on what is installed on the build agent or local machines or how the stars are aligned, we can get different versions of the WindowsAppSDK. That in turn might bring in different versions of transitive packages like WinRT.Runtime.
This was the case I was hitting. I tried to update the Toolkit dependency for the .NET MAUI templates, but it wouldn't build because the Toolkit was (transitively) referencing WinRT.Runtime 2.2.0 (because we were building against a newer WindowsAppSDK) and the templates were referencing WinRT.Runtime 2.1.0, because .NET MAUI pins the WindowsAppSDK to 10.0.19041.44 (at time of writing).
To overcome this happening by surprise lets pin the WindowsSdkPackageVersion in the Toolkit to the same version as .NET MAUI.
I'm doing this on a weirdish branch that is branched of the 11.1.0 tag and will be released as a 11.1.1 version. This is needed because 11.2.0 has a minimum dependency on .NET MAUI 9.0.50. The templates will be inserted in Visual Studio together with version 9.0.40, so I will need a version of the Toolkit with this bug fixed and that is able to be used with 9.0.40, hence this extra release.
This change also needs to be ported to the main branch so that we also do this moving forward.