You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WinUI 3 blank app created with the Visual Studio template "Blank App, Packaged with Windows Application Packaging Project (WinUI 3 in Desktop)" does not start when published.
Steps to reproduce the bug
Open Visual Studio 2022
Create a new project with the template "Blank App, Packaged with Windows Application Packaging Project (WinUI 3 in Desktop)" (C#)
Build the solution and get the following error:
This version of the Windows App SDK requires Microsoft.Windows.SDK.NET.Ref 10.0.19041.38 or later.
Please update to .NET SDK 6.0.134, 6.0.426, 8.0.109, 8.0.305 or 8.0.402 (or later).
Or add a temporary Microsoft.Windows.SDK.NET.Ref reference which can be added with:
<PropertyGroup>
<WindowsSdkPackageVersion>10.0.19041.38</WindowsSdkPackageVersion>
</PropertyGroup>
App5 c:\NUGET_PACKAGES\microsoft.windowsappsdk\1.6.240829007\buildTransitive\Microsoft.WindowsAppSDK.targets 76
In each pubxml file under "Properties" -> "PublishProfiles", replace win10-x64 with win-x64 to avoid the following error when publishing app package.
The specified RuntimeIdentifier 'win10-x64' is not recognized. See https://aka.ms/netsdk1083 for more information. C:\Program Files\dotnet\sdk\8.0.400\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets 91
Add <WindowsSdkPackageVersion>10.0.19041.38</WindowsSdkPackageVersion> in the WinUI 3 app project file as the error message suggests.
Right click the WAP project, publish -> Create app packages..
Choose side loading, create a self-signed certificate, trust it, tick x64, Debug(x64) on the next screen, leave everything else as is.
Choose an installer location, click create to create the app package.
Once publish is done, open the app package location, double click the msixbundle file to install the app.
The app should launch if "Launch when ready" is ticked in the installation dialog, or try to launch to app from start menu, the app does not launch.
Expected behavior
The blank app should launch after installed with the published msixbundle package.
PackagedBlankApp is a blank app project created with the template "Blank App, Packaged (Win UI 3 in Desktop)" which does not have this issue. PackagedBlankAppWithWap is the project created with the template "Blank App, Packaged with Windows Application Packaging Project (WinUI 3 in Desktop)" where this issue occurs.
The text was updated successfully, but these errors were encountered:
Closing as VS 17.12 does fix this issue as mentioned here: #9740 (comment).
However, still having another issue publishing ARM64 app, which is raised separately here: #9998.
Describe the bug
WinUI 3 blank app created with the Visual Studio template "Blank App, Packaged with Windows Application Packaging Project (WinUI 3 in Desktop)" does not start when published.
Steps to reproduce the bug
win10-x64
withwin-x64
to avoid the following error when publishing app package.<WindowsSdkPackageVersion>10.0.19041.38</WindowsSdkPackageVersion>
in the WinUI 3 app project file as the error message suggests.msixbundle
file to install the app.Expected behavior
The blank app should launch after installed with the published msixbundle package.
Screenshots
No response
NuGet package version
WinUI 3 - Windows App SDK 1.6.0: 1.6.240829007
Windows version
Windows 11 (22H2): Build 22621
Additional context
Please see projects that reproduces this issue here: https://github.com/aries-zhang/winui3-adventure/tree/main/published-app-crashes
PackagedBlankApp is a blank app project created with the template "Blank App, Packaged (Win UI 3 in Desktop)" which does not have this issue.
PackagedBlankAppWithWap is the project created with the template "Blank App, Packaged with Windows Application Packaging Project (WinUI 3 in Desktop)" where this issue occurs.
The text was updated successfully, but these errors were encountered: