Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Upgrade WindowsAppSDK dependency version #14107

Closed
KieranDevvs opened this issue Mar 21, 2023 · 20 comments
Closed

Upgrade WindowsAppSDK dependency version #14107

KieranDevvs opened this issue Mar 21, 2023 · 20 comments
Labels
area-infrastructure CI, Maestro / Coherency, upstream dependencies/versions platform/windows 🪟 t/enhancement ☀️ New feature or request
Milestone

Comments

@KieranDevvs
Copy link

Description

In regards to the issue relating to the WebView2 control freezing when typing too fast: #12361

The issue has been fixed in a newer dependency version of WindowsAppSDK. Can MAUI please upgrade the references as manually specifying the PackageReference (<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.2.230313.1" />) results in problems building with the following errors:

error NU1102: Unable to find package Microsoft.NETCore.App.Runtime.Mono.win-arm
error NU1102: Unable to find package Microsoft.NETCore.App.Runtime.Mono.win-arm64

Along with this error when attempting to publish via the CLI:

C:\Users\Kieran Devlin\.nuget\packages\microsoft.windowsappsdk\1.2.230313.1\buildTransitive\Microsoft.UI.Xaml.Markup.Co
mpiler.interop.targets(559,9): error MSB3073: The command ""C:\Users\Kieran Devlin\.nuget\packages\microsoft.windowsapp
sdk\1.2.230313.1\buildTransitive\..\tools\net5.0\..\net472\XamlCompiler.exe" "obj\release\net7.0-android\\input.json" "
obj\release\net7.0-android\\output.json"" exited with code 1. [C:\Users\Kieran Devlin\Documents\git\sources\App\..\App.csproj::TargetFramework=net7.0-android]

Steps to Reproduce

  1. Specify the dependency version that fixes the referenced problem (<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.2.230313.1" />)
  2. Build once (the first build seems to work fine)
  3. Build again, this build & all subsequent builds will fail.

Link to public reproduction project repository

N/a

Version with bug

7.0 (current)

Last version that worked well

7.0 (current)

Affected platforms

Android, Windows, I was not able test on other platforms

Affected platform versions

N/a

Did you find any workaround?

No response

Relevant log output

No response

@KieranDevvs KieranDevvs added the t/bug Something isn't working label Mar 21, 2023
@drasticactions
Copy link
Contributor

drasticactions commented Mar 22, 2023

I believe that's already bumped in Main?

maui/eng/Versions.props

Lines 24 to 26 in 9aa30fc

<!-- wasdk -->
<MicrosoftWindowsAppSDKPackageVersion>1.3.230228005-preview1</MicrosoftWindowsAppSDKPackageVersion>
<MicrosoftWindowsSDKBuildToolsPackageVersion>10.0.22621.756</MicrosoftWindowsSDKBuildToolsPackageVersion>

@jfversluis
Copy link
Member

Yeah I would assume people would want this as a service release for .NET 7?

@mattleibow ?

@ghost ghost added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Mar 22, 2023
@rachelkang rachelkang added this to the Backlog milestone Mar 22, 2023
@ghost
Copy link

ghost commented Mar 22, 2023

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

@KieranDevvs
Copy link
Author

I was hoping this would be a P1/P2 issue to be honest... Not being able to use the application is pretty severe.

@GabrielChouinardLetourneau
Copy link

GabrielChouinardLetourneau commented Mar 29, 2023

In my case, I am using net6.0, but I'm having a similar issue on the hosted Azure agents I'm building my Windows application on. I tried with other TargetFramework, but the issue stays the same. I've also tried with multiple versions of WindowsAppSDK and BuildTools.

error MSB3073: The command ""C:\Users\VssAdministrator\.nuget\packages\microsoft.windowsappsdk\1.2.221209.1\buildTransitive\..\tools\net5.0\..\net472\XamlCompiler.exe" "obj\x64\Release\net6.0-windows10.0.22000.0\win-x64\\input.json" "obj\x64\Release\net6.0-windows10.0.22000.0\win-x64\\output.json"" exited with code 1.

@IsmailHassani
Copy link

This is because you're referencing it also in the android and ios app.
If you reference it like this, it will work (only for Windows!)

<ItemGroup Condition="'$(TargetFramework)'=='net7.0-windows10.0.19041.0'">
   <PackageReference Include="Microsoft.WindowsAppSDK" Version="1.3.230331000" />
</ItemGroup>

@KieranDevvs
Copy link
Author

KieranDevvs commented Apr 13, 2023

This is because you're referencing it also in the android and ios app.
If you reference it like this, it will work (only for Windows!)

While this may be a temporary work around, Id still like to see the framework take on the upgrade rather than delegating it to users.

@mattleibow
Copy link
Member

We are keeping pretty much up to date. However, I think this is .net 7.

@Xyncgas
Copy link

Xyncgas commented May 1, 2023

Would #14435 makes it possible for this issue to be addressed further, letting people no longer have to paste the WindowsAPpSSDK package to fix the problem causing MAUI.Blazor unable to use mouse

@ghost
Copy link

ghost commented May 10, 2023

This issue is also necessary for the compilation problem mentioned in #7846. WindowsPackage compilation fails when I use an external MAUI library.

microsoft/microsoft-ui-xaml#7846

@ghost
Copy link

ghost commented May 22, 2023

How is it possible to get any feedback on this or a possible solution date?

@mattleibow
Copy link
Member

This is because you're referencing it also in the android and ios app.
If you reference it like this, it will work (only for Windows!)

<ItemGroup Condition="'$(TargetFramework)'=='net7.0-windows10.0.19041.0'">
   <PackageReference Include="Microsoft.WindowsAppSDK" Version="1.3.230331000" />
</ItemGroup>

I think this appears to be a bug because you have to do this, but this is as designed. When a new "major" version of wasdk comes out we will take some time before updating.

Versions 1.2 and 1.3 are considered "major"-ish versions by the wasdk team. So we don't want to go updating everyone as soon as there is a new version.

.NET 7 is based on 1.2 and .NET 8 is based on 1.3. Depending on feedback - such as this issue - we will investigate and consider updating the version that comes with the Maui install.

Regardless of everything and anything, having to specify the updated version of wasdk is a feature. Allowing developers to update versions of dependencies outside the default maui version is a feature not a bug.

@mattleibow mattleibow added t/enhancement ☀️ New feature or request and removed t/bug Something isn't working legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor area-controls-webview WebView labels May 22, 2023
@KieranDevvs
Copy link
Author

This is because you're referencing it also in the android and ios app.
If you reference it like this, it will work (only for Windows!)

<ItemGroup Condition="'$(TargetFramework)'=='net7.0-windows10.0.19041.0'">
   <PackageReference Include="Microsoft.WindowsAppSDK" Version="1.3.230331000" />
</ItemGroup>

I think this appears to be a bug because you have to do this, but this is as designed. When a new "major" version of wasdk comes out we will take some time before updating.

Versions 1.2 and 1.3 are considered "major"-ish versions by the wasdk team. So we don't want to go updating everyone as soon as there is a new version.

.NET 7 is based on 1.2 and .NET 8 is based on 1.3. Depending on feedback - such as this issue - we will investigate and consider updating the version that comes with the Maui install.

Regardless of everything and anything, having to specify the updated version of wasdk is a feature. Allowing developers to update versions of dependencies outside the default maui version is a feature not a bug.

I understand what you're saying but then the WindowsSDK patch needs to be applied to 1.2 in a minor update so that a minor revision for MAUI can be released?

Otherwise you're saying you cant fix a show stopper bug out of the box, until a major release of MAUI?

@ghost
Copy link

ghost commented May 22, 2023

I am currently developing 1 MAUI Blazor Library project and 5 MAUI Blazor projects based on it.
I have no problem compiling for Android or debugging in Windows/Android environment.
However, when I want to compile as WindowsPackage, I run into the problem mentioned here; microsoft-ui-xaml/issues/7846

So temporarily, I have to copy all the functions in the Library Project to all 5 projects.
Unless I misunderstood from your answer, until .NET 8, the MAUI Library Project type is garbage.

@HelenMamalaki
Copy link

@mattleibow In addition to this, here is another major issue fixed in 1.3 microsoft/microsoft-ui-xaml#6291
Not having the onscreen keyboard appear on tapping into entry fields is major blocker for going to production. Last I heard .NET 8 is unstable for us to upgrade to the preview version. I will try the code block you posted.

@AnithaRaniT
Copy link

AnithaRaniT commented Sep 29, 2023

I'm also facing the issue, which is blocking me the production release. someone help me to overcome this issue.

I'm unable to update the Microsoft.WindowsAppSDK version from 1.2.221109.1 to any higher version due to my project is blocking this from the update. PFA FYI

image

I found one suggestion is that to add in the .csproj file is that,

<ItemGroup Condition="'$(TargetFramework)'=='net7.0-windows10.0.20348.0'"> <PackageReference Include="Microsoft.WindowsAppSDK" Version="1.3.230331000" /> </ItemGroup>

after adding that also not able to publish the app package for the windows platform.

Here is my target platforms:
<TargetFrameworks>net7.0-ios;net7.0-android33.0</TargetFrameworks> <TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net7.0-windows10.0.20348.0</TargetFrameworks>

@IsmailHassani Please provide some solution for this as this is high priority which is blocking from the production release.

Here is my VS version details.

image

Please let me know if any details required

@IsmailHassani
Copy link

@AnithaRaniT Hi there, what is the error you're getting?
Because this adjustment should be done directly in your cs-proj file.
Not from the nuget update tool.

@solomonfried
Copy link
Contributor

I left this post at microsoft/microsoft-ui-xaml#7846 (comment)

same issue. Cannot Publish a windows app due to the error

"Improper project configuration: WindowsPackageType is set to None, but PublishAppxPackage is set to true."

Advice given was to upgrade to Windows SDK 1.3, but this is not allowed from the Nuget manager.

This issue of not being able to Publish a windows Maui App containing a Maui class library has been open for a year.
I would think this would be considered Critical!!!

@AnithaRaniT
Copy link

AnithaRaniT commented Oct 5, 2023

@solomonfried You can publish your app with help of CLI which is documented here: https://learn.microsoft.com/en-us/dotnet/maui/windows/deployment/publish-cli

Before that you need to change the TargetFrameworks for the windows as
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net7.0-windows10.0.19041.0</TargetFrameworks>

and then follow the guide.

@strich
Copy link

strich commented Oct 14, 2023

This continues to be a serious issue on the default .NET 7 template. I'm lucky I stumbled upon this issue otherwise I'd have just abandoned MAUI.

@dotnet dotnet locked and limited conversation to collaborators May 6, 2024
@PureWeen PureWeen converted this issue into discussion #22237 May 6, 2024
@Eilon Eilon added area-infrastructure CI, Maestro / Coherency, upstream dependencies/versions and removed area/upstream labels May 10, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
area-infrastructure CI, Maestro / Coherency, upstream dependencies/versions platform/windows 🪟 t/enhancement ☀️ New feature or request
Projects
None yet
Development

No branches or pull requests