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

Maui Windows unpackaged app fails to start #5927

Closed
eerhardt opened this issue Apr 8, 2022 · 0 comments · Fixed by #5979
Closed

Maui Windows unpackaged app fails to start #5927

eerhardt opened this issue Apr 8, 2022 · 0 comments · Fixed by #5979
Assignees
Labels
area-publishing Issues with the app packaging/publishing process (ipk/apk/msix/trimming) platform/windows 🪟 t/bug Something isn't working

Comments

@eerhardt
Copy link
Member

eerhardt commented Apr 8, 2022

Description

When running an "unpackaged" Maui Windows app it is crashing on startup due to microsoft/WindowsAppSDK#2382 here:

static ImageViewExtensions()
{
IsAnimationSupported =
ApiInformation.IsPropertyPresent(BitmapImageTypeName, nameof(BitmapImage.IsAnimatedBitmap)) &&
ApiInformation.IsPropertyPresent(BitmapImageTypeName, nameof(BitmapImage.IsPlaying)) &&
ApiInformation.IsPropertyPresent(BitmapImageTypeName, nameof(BitmapImage.Play)) &&
ApiInformation.IsPropertyPresent(BitmapImageTypeName, nameof(BitmapImage.Stop));
}

Because this static constructor is throwing an exception in an unpackaged app, the app fails to load.

Steps to Reproduce

  1. dotnet new maui
  2. Change the .csproj to be:
  <PropertyGroup>
    <TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
    <OutputType>Exe</OutputType>
    <RootNamespace>MauiTest</RootNamespace>
    <UseMaui>true</UseMaui>
    <SingleProject>true</SingleProject>
    <ImplicitUsings>enable</ImplicitUsings>
    <WindowsPackageType>None</WindowsPackageType>
    <WinUISDKReferences>false</WinUISDKReferences>
    <Platform>x64</Platform>
...

  <ItemGroup>
    <PackageReference Condition="$(TargetFramework.Contains('-windows'))" Include="microsoft.windowsappsdk" Version="1.0.2" />
  </ItemGroup>
  1. dotnet build -c Release
  2. Run the .exe in bin\Release\net6.0-windows10.0.19041.0\win10-x64\

Version with bug

Unknown/Other (please specify)

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

System.InvalidOperationException
  HResult=0x80131509
  Message=Exception of type 'System.InvalidOperationException' was thrown.
  Source=WinRT.Runtime
  StackTrace:
   at WinRT.ExceptionHelpers.<ThrowExceptionForHR>g__Throw|20_0(Int32 hr) in D:\a\1\s\src\WinRT.Runtime\ExceptionHelpers.cs:line 82

>	WinRT.Runtime.dll!WinRT.ExceptionHelpers.ThrowExceptionForHR.__Throw|20_0(int hr) Line 82	C#
 	WinRT.Runtime.dll!WinRT.ExceptionHelpers.ThrowExceptionForHR(int hr) Line 85	C#
 	Microsoft.Windows.SDK.NET.dll!ABI.Windows.Foundation.Metadata.IApiInformationStaticsMethods.IsPropertyPresent(WinRT.IObjectReference _obj, string typeName, string propertyName) Line 493	C#
 	Microsoft.Windows.SDK.NET.dll!Windows.Foundation.Metadata.ApiInformation.IsPropertyPresent(string typeName, string propertyName) Line 88	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Platform.ImageViewExtensions.ImageViewExtensions() Line 21	C#
 	[Native to Managed Transition]	
 	[Managed to Native Transition]	
 	Microsoft.Maui.dll!Microsoft.Maui.Platform.ImageViewExtensions.UpdateAspect(Microsoft.UI.Xaml.Controls.Image imageView, Microsoft.Maui.IImage image) Line 35	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Handlers.ImageHandler.MapAspect(Microsoft.Maui.Handlers.IImageHandler handler, Microsoft.Maui.IImage image) Line 30	C#
 	Microsoft.Maui.dll!Microsoft.Maui.PropertyMapper.UpdatePropertyCore(string key, Microsoft.Maui.IElementHandler viewHandler, Microsoft.Maui.IElement virtualView) Line 36	C#
 	Microsoft.Maui.dll!Microsoft.Maui.PropertyMapper.UpdateProperties(Microsoft.Maui.IElementHandler viewHandler, Microsoft.Maui.IElement virtualView) Line 68	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Handlers.ElementHandler.SetVirtualView(Microsoft.Maui.IElement view) Line 75	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Handlers.ViewHandler<System.__Canon, System.__Canon>.SetVirtualView(Microsoft.Maui.IView view) Line 51	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Handlers.ViewHandler<System.__Canon, System.__Canon>.SetVirtualView(Microsoft.Maui.IElement view) Line 54	C#
 	Microsoft.Maui.Controls.dll!Microsoft.Maui.Controls.Element.SetHandler(Microsoft.Maui.IElementHandler newHandler) Line 66	C#
 	Microsoft.Maui.Controls.dll!Microsoft.Maui.Controls.Element.Handler.set(Microsoft.Maui.IElementHandler value) Line 20	C#
 	Microsoft.Maui.Controls.dll!Microsoft.Maui.Controls.VisualElement.Microsoft.Maui.IElement.Handler.set(Microsoft.Maui.IElementHandler value) Line 296	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Platform.ElementExtensions.ToHandler(Microsoft.Maui.IElement view, Microsoft.Maui.IMauiContext context) Line 93	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Platform.ElementExtensions.ToPlatform(Microsoft.Maui.IElement view, Microsoft.Maui.IMauiContext context) Line 127	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Handlers.LayoutHandler.SetVirtualView(Microsoft.Maui.IView view) Line 36	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Handlers.ViewHandler<System.__Canon, System.__Canon>.SetVirtualView(Microsoft.Maui.IElement view) Line 54	C#
 	Microsoft.Maui.Controls.dll!Microsoft.Maui.Controls.Element.SetHandler(Microsoft.Maui.IElementHandler newHandler) Line 66	C#
 	Microsoft.Maui.Controls.dll!Microsoft.Maui.Controls.Element.Handler.set(Microsoft.Maui.IElementHandler value) Line 20	C#
 	Microsoft.Maui.Controls.dll!Microsoft.Maui.Controls.VisualElement.Microsoft.Maui.IElement.Handler.set(Microsoft.Maui.IElementHandler value) Line 296	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Platform.ElementExtensions.ToHandler(Microsoft.Maui.IElement view, Microsoft.Maui.IMauiContext context) Line 93	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Platform.ElementExtensions.ToPlatform(Microsoft.Maui.IElement view, Microsoft.Maui.IMauiContext context) Line 127	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Platform.ScrollViewerExtensions.UpdateContent(Microsoft.UI.Xaml.Controls.ScrollViewer scrollViewer, Microsoft.Maui.IView content, Microsoft.Maui.IMauiContext context) Line 55	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Handlers.ScrollViewHandler.MapContent(Microsoft.Maui.Handlers.IScrollViewHandler handler, Microsoft.Maui.IScrollView scrollView) Line 64	C#
 	Microsoft.Maui.dll!Microsoft.Maui.PropertyMapper.UpdatePropertyCore(string key, Microsoft.Maui.IElementHandler viewHandler, Microsoft.Maui.IElement virtualView) Line 36	C#
 	Microsoft.Maui.dll!Microsoft.Maui.PropertyMapper.UpdateProperties(Microsoft.Maui.IElementHandler viewHandler, Microsoft.Maui.IElement virtualView) Line 68	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Handlers.ElementHandler.SetVirtualView(Microsoft.Maui.IElement view) Line 75	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Handlers.ViewHandler<System.__Canon, System.__Canon>.SetVirtualView(Microsoft.Maui.IView view) Line 51	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Handlers.ViewHandler<System.__Canon, System.__Canon>.SetVirtualView(Microsoft.Maui.IElement view) Line 54	C#
 	Microsoft.Maui.Controls.dll!Microsoft.Maui.Controls.Element.SetHandler(Microsoft.Maui.IElementHandler newHandler) Line 66	C#
 	Microsoft.Maui.Controls.dll!Microsoft.Maui.Controls.Element.Handler.set(Microsoft.Maui.IElementHandler value) Line 20	C#
 	Microsoft.Maui.Controls.dll!Microsoft.Maui.Controls.VisualElement.Microsoft.Maui.IElement.Handler.set(Microsoft.Maui.IElementHandler value) Line 296	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Platform.ElementExtensions.ToHandler(Microsoft.Maui.IElement view, Microsoft.Maui.IMauiContext context) Line 93	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Platform.ElementExtensions.ToPlatform(Microsoft.Maui.IElement view, Microsoft.Maui.IMauiContext context) Line 127	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Handlers.ContentViewHandler.UpdateContent(Microsoft.Maui.Handlers.IContentViewHandler handler) Line 29	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Handlers.ContentViewHandler.MapContent(Microsoft.Maui.Handlers.IContentViewHandler handler, Microsoft.Maui.IContentView page) Line 51	C#
 	Microsoft.Maui.dll!Microsoft.Maui.PropertyMapper.UpdatePropertyCore(string key, Microsoft.Maui.IElementHandler viewHandler, Microsoft.Maui.IElement virtualView) Line 36	C#
 	Microsoft.Maui.dll!Microsoft.Maui.PropertyMapper.UpdateProperties(Microsoft.Maui.IElementHandler viewHandler, Microsoft.Maui.IElement virtualView) Line 68	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Handlers.ElementHandler.SetVirtualView(Microsoft.Maui.IElement view) Line 75	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Handlers.ViewHandler<System.__Canon, System.__Canon>.SetVirtualView(Microsoft.Maui.IView view) Line 51	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Handlers.ContentViewHandler.SetVirtualView(Microsoft.Maui.IView view) Line 13	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Handlers.ViewHandler<System.__Canon, System.__Canon>.SetVirtualView(Microsoft.Maui.IElement view) Line 54	C#
 	Microsoft.Maui.Controls.dll!Microsoft.Maui.Controls.Element.SetHandler(Microsoft.Maui.IElementHandler newHandler) Line 66	C#
 	Microsoft.Maui.Controls.dll!Microsoft.Maui.Controls.Element.Handler.set(Microsoft.Maui.IElementHandler value) Line 20	C#
 	Microsoft.Maui.Controls.dll!Microsoft.Maui.Controls.VisualElement.Microsoft.Maui.IElement.Handler.set(Microsoft.Maui.IElementHandler value) Line 296	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Platform.ElementExtensions.ToHandler(Microsoft.Maui.IElement view, Microsoft.Maui.IMauiContext context) Line 93	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Platform.ElementExtensions.ToPlatform(Microsoft.Maui.IElement view, Microsoft.Maui.IMauiContext context) Line 127	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Platform.StackNavigationManager.OnNavigated(object sender, Microsoft.UI.Xaml.Navigation.NavigationEventArgs e) Line 174	C#
 	Microsoft.WinUI.dll!WinRT._EventSource_global__Microsoft_UI_Xaml_Navigation_NavigatedEventHandler.EventState.GetEventInvoke.AnonymousMethod__1_0(object sender, Microsoft.UI.Xaml.Navigation.NavigationEventArgs e) Line 5682	C#
 	Microsoft.WinUI.dll!ABI.Microsoft.UI.Xaml.Navigation.NavigatedEventHandler.Do_Abi_Invoke.AnonymousMethod__0(Microsoft.UI.Xaml.Navigation.NavigatedEventHandler invoke) Line 1889	C#
 	Microsoft.WinUI.dll!ABI.Microsoft.UI.Xaml.Navigation.NavigatedEventHandler.Do_Abi_Invoke(System.IntPtr thisPtr, System.IntPtr sender, System.IntPtr e) Line 1898	C#
 	[Native to Managed Transition]	
 	[Managed to Native Transition]	
 	Microsoft.WinUI.dll!ABI.Microsoft.UI.Xaml.Controls.IFrame.Microsoft.UI.Xaml.Controls.IFrame.Navigate(System.Type sourcePageType, object parameter, Microsoft.UI.Xaml.Media.Animation.NavigationTransitionInfo infoOverride) Line 99069	C#
 	Microsoft.WinUI.dll!Microsoft.UI.Xaml.Controls.Frame.Navigate(System.Type sourcePageType, object parameter, Microsoft.UI.Xaml.Media.Animation.NavigationTransitionInfo infoOverride) Line 12002	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Platform.StackNavigationManager.NavigateTo(Microsoft.Maui.NavigationRequest args) Line 94	C#
 	Microsoft.Maui.Controls.dll!Microsoft.Maui.Controls.Handlers.ShellSectionHandler.RequestNavigation(Microsoft.Maui.Controls.Handlers.ShellSectionHandler handler, Microsoft.Maui.IStackNavigation view, object arg3) Line 110	C#
 	Microsoft.Maui.dll!Microsoft.Maui.CommandMapper<Microsoft.Maui.Controls.ShellSection, Microsoft.Maui.Controls.Handlers.ShellSectionHandler>.Add.AnonymousMethod__0(Microsoft.Maui.IElementHandler h, Microsoft.Maui.IElement v, object o) Line 89	C#
 	Microsoft.Maui.dll!Microsoft.Maui.CommandMapper.InvokeCore(string key, Microsoft.Maui.IElementHandler viewHandler, Microsoft.Maui.IElement virtualView, object args) Line 31	C#
 	Microsoft.Maui.dll!Microsoft.Maui.CommandMapper.Invoke(Microsoft.Maui.IElementHandler viewHandler, Microsoft.Maui.IElement virtualView, string property, object args) Line 49	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Handlers.ElementHandler.Invoke(string command, object args) Line 91	C#
 	Microsoft.Maui.Controls.dll!Microsoft.Maui.Controls.ShellSection.Microsoft.Maui.IStackNavigation.RequestNavigation(Microsoft.Maui.NavigationRequest eventArgs) Line 19	C#
 	Microsoft.Maui.Controls.dll!Microsoft.Maui.Controls.Handlers.ShellSectionHandler.MapCurrentItem(Microsoft.Maui.Controls.Handlers.ShellSectionHandler handler, Microsoft.Maui.Controls.ShellSection item) Line 42	C#
 	Microsoft.Maui.dll!Microsoft.Maui.PropertyMapper.UpdatePropertyCore(string key, Microsoft.Maui.IElementHandler viewHandler, Microsoft.Maui.IElement virtualView) Line 36	C#
 	Microsoft.Maui.dll!Microsoft.Maui.PropertyMapper.UpdateProperties(Microsoft.Maui.IElementHandler viewHandler, Microsoft.Maui.IElement virtualView) Line 68	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Handlers.ElementHandler.SetVirtualView(Microsoft.Maui.IElement view) Line 75	C#
 	Microsoft.Maui.Controls.dll!Microsoft.Maui.Controls.Handlers.ShellSectionHandler.SetVirtualView(Microsoft.Maui.IElement view) Line 54	C#
 	Microsoft.Maui.Controls.dll!Microsoft.Maui.Controls.Element.SetHandler(Microsoft.Maui.IElementHandler newHandler) Line 66	C#
 	Microsoft.Maui.Controls.dll!Microsoft.Maui.Controls.Element.Handler.set(Microsoft.Maui.IElementHandler value) Line 20	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Platform.ElementExtensions.ToHandler(Microsoft.Maui.IElement view, Microsoft.Maui.IMauiContext context) Line 93	C#
 	Microsoft.Maui.Controls.dll!Microsoft.Maui.Controls.Handlers.ShellItemHandler.MapCurrentItem(Microsoft.Maui.Controls.Handlers.ShellItemHandler handler, Microsoft.Maui.Controls.ShellItem item) Line 303	C#
 	Microsoft.Maui.dll!Microsoft.Maui.PropertyMapper.UpdatePropertyCore(string key, Microsoft.Maui.IElementHandler viewHandler, Microsoft.Maui.IElement virtualView) Line 36	C#
 	Microsoft.Maui.dll!Microsoft.Maui.PropertyMapper.UpdateProperties(Microsoft.Maui.IElementHandler viewHandler, Microsoft.Maui.IElement virtualView) Line 68	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Handlers.ElementHandler.SetVirtualView(Microsoft.Maui.IElement view) Line 75	C#
 	Microsoft.Maui.Controls.dll!Microsoft.Maui.Controls.Handlers.ShellItemHandler.SetVirtualView(Microsoft.Maui.IElement view) Line 85	C#
 	Microsoft.Maui.Controls.dll!Microsoft.Maui.Controls.Element.SetHandler(Microsoft.Maui.IElementHandler newHandler) Line 66	C#
 	Microsoft.Maui.Controls.dll!Microsoft.Maui.Controls.Element.Handler.set(Microsoft.Maui.IElementHandler value) Line 20	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Platform.ElementExtensions.ToHandler(Microsoft.Maui.IElement view, Microsoft.Maui.IMauiContext context) Line 93	C#
 	Microsoft.Maui.Controls.dll!Microsoft.Maui.Controls.Platform.ShellView.CreateShellItemView() Line 188	C#
 	Microsoft.Maui.Controls.dll!Microsoft.Maui.Controls.Platform.ShellView.SwitchShellItem(Microsoft.Maui.Controls.ShellItem newItem, bool animate) Line 151	C#
 	Microsoft.Maui.Controls.dll!Microsoft.Maui.Controls.Handlers.ShellHandler.MapCurrentItem(Microsoft.Maui.Controls.Handlers.ShellHandler handler, Microsoft.Maui.Controls.Shell view) Line 70	C#
 	Microsoft.Maui.dll!Microsoft.Maui.PropertyMapper.UpdatePropertyCore(string key, Microsoft.Maui.IElementHandler viewHandler, Microsoft.Maui.IElement virtualView) Line 36	C#
 	Microsoft.Maui.dll!Microsoft.Maui.PropertyMapper.UpdateProperties(Microsoft.Maui.IElementHandler viewHandler, Microsoft.Maui.IElement virtualView) Line 68	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Handlers.ElementHandler.SetVirtualView(Microsoft.Maui.IElement view) Line 75	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Handlers.ViewHandler<System.__Canon, System.__Canon>.SetVirtualView(Microsoft.Maui.IView view) Line 51	C#
 	Microsoft.Maui.Controls.dll!Microsoft.Maui.Controls.Handlers.ShellHandler.SetVirtualView(Microsoft.Maui.IView view) Line 55	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Handlers.ViewHandler<System.__Canon, System.__Canon>.SetVirtualView(Microsoft.Maui.IElement view) Line 54	C#
 	Microsoft.Maui.Controls.dll!Microsoft.Maui.Controls.Element.SetHandler(Microsoft.Maui.IElementHandler newHandler) Line 66	C#
 	Microsoft.Maui.Controls.dll!Microsoft.Maui.Controls.Element.Handler.set(Microsoft.Maui.IElementHandler value) Line 20	C#
 	Microsoft.Maui.Controls.dll!Microsoft.Maui.Controls.VisualElement.Microsoft.Maui.IElement.Handler.set(Microsoft.Maui.IElementHandler value) Line 296	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Platform.ElementExtensions.ToHandler(Microsoft.Maui.IElement view, Microsoft.Maui.IMauiContext context) Line 93	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Platform.ElementExtensions.ToPlatform(Microsoft.Maui.IElement view, Microsoft.Maui.IMauiContext context) Line 127	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Platform.NavigationRootManager.Connect(Microsoft.Maui.IView view) Line 57	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Handlers.WindowHandler.MapContent(Microsoft.Maui.Handlers.IWindowHandler handler, Microsoft.Maui.IWindow window) Line 49	C#
 	Microsoft.Maui.dll!Microsoft.Maui.PropertyMapper.UpdatePropertyCore(string key, Microsoft.Maui.IElementHandler viewHandler, Microsoft.Maui.IElement virtualView) Line 36	C#
 	Microsoft.Maui.dll!Microsoft.Maui.PropertyMapper.UpdateProperties(Microsoft.Maui.IElementHandler viewHandler, Microsoft.Maui.IElement virtualView) Line 68	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Handlers.ElementHandler.SetVirtualView(Microsoft.Maui.IElement view) Line 75	C#
 	Microsoft.Maui.Controls.dll!Microsoft.Maui.Controls.Element.SetHandler(Microsoft.Maui.IElementHandler newHandler) Line 66	C#
 	Microsoft.Maui.Controls.dll!Microsoft.Maui.Controls.Element.Handler.set(Microsoft.Maui.IElementHandler value) Line 20	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Platform.ElementExtensions.SetHandler(WinRT.IWinRTObject nativeElement, Microsoft.Maui.IElement element, Microsoft.Maui.IMauiContext context) Line 158	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Platform.ElementExtensions.SetWindowHandler(Microsoft.UI.Xaml.Window platformWindow, Microsoft.Maui.IWindow window, Microsoft.Maui.IMauiContext context) Line 166	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Platform.ApplicationExtensions.CreatePlatformWindow(Microsoft.UI.Xaml.Application platformApplication, Microsoft.Maui.IApplication application, Microsoft.Maui.Handlers.OpenWindowRequest args) Line 30	C#
 	Microsoft.Maui.dll!Microsoft.Maui.Platform.ApplicationExtensions.CreatePlatformWindow(Microsoft.UI.Xaml.Application platformApplication, Microsoft.Maui.IApplication application, Microsoft.UI.Xaml.LaunchActivatedEventArgs args) Line 9	C#
 	Microsoft.Maui.dll!Microsoft.Maui.MauiWinUIApplication.OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args) Line 39	C#
 	Microsoft.WinUI.dll!Microsoft.UI.Xaml.Application.Microsoft.UI.Xaml.IApplicationOverrides.OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args) Line 344	C#
 	Microsoft.WinUI.dll!ABI.Microsoft.UI.Xaml.IApplicationOverrides.Do_Abi_OnLaunched_0(System.IntPtr thisPtr, System.IntPtr args) Line 13032	C#
 	[Native to Managed Transition]	
 	[Managed to Native Transition]	
 	Microsoft.WinUI.dll!ABI.Microsoft.UI.Xaml.IApplicationStatics.Microsoft.UI.Xaml.IApplicationStatics.Start(Microsoft.UI.Xaml.ApplicationInitializationCallback callback) Line 13158	C#
 	Microsoft.WinUI.dll!Microsoft.UI.Xaml.Application.Start(Microsoft.UI.Xaml.ApplicationInitializationCallback callback) Line 285	C#
 	MauiTest.dll!MauiTest.WinUI.Program.Main(string[] args) Line 31	C#
@eerhardt eerhardt added t/bug Something isn't working s/needs-verification Indicates that this issue needs initial verification before further triage will happen labels Apr 8, 2022
@jfversluis jfversluis added platform/windows 🪟 area-publishing Issues with the app packaging/publishing process (ipk/apk/msix/trimming) and removed s/needs-verification Indicates that this issue needs initial verification before further triage will happen labels Apr 10, 2022
@eerhardt eerhardt self-assigned this Apr 11, 2022
eerhardt added a commit to eerhardt/maui that referenced this issue Apr 11, 2022
Due to microsoft/WindowsAppSDK#2382, ApiInformation IsPropertyPresent and IsMethodPresent throw in unpackaged apps. Working around this problem by assuming BitmapImages support animation in unpackaged apps.

Fix dotnet#5927
eerhardt added a commit to eerhardt/maui that referenced this issue Apr 11, 2022
Due to microsoft/WindowsAppSDK#2382, ApiInformation IsPropertyPresent and IsMethodPresent throw in unpackaged apps. Working around this problem by assuming BitmapImages support animation in unpackaged apps.

Fix dotnet#5927
mattleibow pushed a commit that referenced this issue Apr 13, 2022
* Maui Windows unpackaged app fails to start

Due to microsoft/WindowsAppSDK#2382, ApiInformation IsPropertyPresent and IsMethodPresent throw in unpackaged apps. Working around this problem by assuming BitmapImages support animation in unpackaged apps.

Fix #5927

* Remove calls to ApiInformation for BitmapImage since these APIs exist in Maui's minimum Windows version.
@ghost ghost locked as resolved and limited conversation to collaborators May 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-publishing Issues with the app packaging/publishing process (ipk/apk/msix/trimming) platform/windows 🪟 t/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants