-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Cannot run unpackaged Windows app - MAUI 6.04 #8186
Comments
I get same on a new project and I it look I run into this issue from App SDK. Looks like we need to wait for a new WindowsApp SDK update and merge into MAUI |
If you're not going through an MSIX, you will need to make sure yourself that all prerequisites are installed. Check that you have the WinAppSDK Runtime installed: https://docs.microsoft.com/windows/apps/windows-app-sdk/downloads Then it works for me, apart from some bugs that still show up :) |
Hi @mjfusa. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
I am also having this issue even after installing windows-app-sdk. I am running the latest as well using blazor maui bindings and trying to run the exe from the publish folder and getting the same error. I downloaded both sdks (64x installers) and it did not make a difference. |
I was able to confirm that you can create an unpackaged (non-MSIX packaged) Windows app with the latest release of MAUI (6.0.4). A couple of things I ran into and resolved:
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.ConfigureLifecycleEvents(lifecycle =>
{
#if WINDOWS
lifecycle
.AddWindows (windows => {
_ = windows.OnWindowCreated ((window) => window.ExtendsContentIntoTitleBar = false);
});
#endif
})
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
});
return builder.Build();
} |
Description
Attempting to run a Windows EXE when published as unpackaged results in crash with an access violation exception (0xc0000005).
Project MauiApp6.sln attached.
MauiApp6.zip
Steps to Reproduce
Use Visual Studio 2022 17.3.0 Preview 2.0 to Create MAUI 6.04 app (includes Windows App SDK 1.1).
On command line:
dotnet publish -f net6.0-windows10.0.19041.0 -c Release -p:WindowsPackageType=None
C:\p\MauiApp5\MauiApp5\bin\Release\net6.0-windows10.0.19041.0\win10-x64\publish\MauiApp.exe
Event Viewer:
Faulting application name: MauiApp6.exe, version: 1.0.0.0, time stamp: 0x62571213
Faulting module name: coreclr.dll, version: 6.0.522.21309, time stamp: 0x625708f4
Exception code: 0xc0000005
Fault offset: 0x00000000001cda03
Faulting process id: 0x7a68
Faulting application start time: 0x01d884ee41834e9b
Faulting application path: C:\p\MauiApp6\MauiApp6\bin\Release\net6.0-windows10.0.19041.0\win10-x64\publish\MauiApp6.exe
Faulting module path: C:\p\MauiApp6\MauiApp6\bin\Release\net6.0-windows10.0.19041.0\win10-x64\publish\coreclr.dll
Report Id: 7ebddae7-c7bf-4508-b031-16ac57a7035d
Faulting package full name:
Faulting package-relative application ID:
Version with bug
6.0.400 (current)
Last version that worked well
Unknown/Other
Affected platforms
Windows
Affected platform versions
Windows 10.0.19041.0
Did you find any workaround?
No
Relevant log output
No response
The text was updated successfully, but these errors were encountered: