-
Notifications
You must be signed in to change notification settings - Fork 334
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
ApiInformation.IsPropertyPresent throws in an unpackaged app #2382
Comments
An exception also occurs for |
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
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
@DefaultRyan or @DrusTheAxe can you look into this? Unpackaged apps should still be causing the bootstrapper to load, which should be putting the right metadata into the package graph for the RoGetMetadata implementations behind this API. |
Useful tidbit: This only repros on Windows 10. Not Windows 11 (22593 at least). And is documented as a known issue: microsoft/microsoft-ui-xaml#6325 |
There's an issue in UndockedRegFreeWinRT not retrieving dynamic package graph entries in metadata lookup. This affects 36717508: UndockedRegFreeWinRT's Metadata lookup calls GetCurrentPackageInfo w/o PACKAGE_FILTER_DYNAMIC |
That is interesting. I'm not sure why. Thanks for the pointer, will investigate |
* 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.
This is fixed in main for 1.2 |
Describe the bug
When I call
ApiInformation.IsPropertyPresent("Microsoft.UI.Xaml.Media.Imaging.BitmapImage", "IsAnimatedBitmap")
in an unpackaged app it is throwing an exception:Steps to reproduce the bug
MainWindow.xaml.cs
to havemyButton_Click
method as:Release
,x64
.bin\x64\Release\net6.0-windows10.0.19041.0\win10-x64
folderExpected behavior
The app shouldn't crash because
ApiInformation.IsPropertyPresent
should either returntrue
orfalse
and not throw an exception.Actual behavior
Screenshots
No response
NuGet package version
1.0.2
Packaging type
Unpackaged
Windows version
Windows 10 version 21H1 (19043, May 2021 Update)
IDE
Visual Studio 2022-preview
Additional context
cc @mattleibow
The text was updated successfully, but these errors were encountered: