We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
AppWindow.Presenter is not recognized as or casted to OverlappedPresenter when changing the framework from Net 8 to Net 9 with PublishAot=true
myButton.Content = AppWindow.Presenter is OverlappedPresenter ? "Yes" : "No";
The result should be the same
No response
Windows App SDK 1.6.3: 1.6.250108002
Unpackaged
Windows 11 version 24H2 (22621, October 2024 Update), Insider Build (xxxxx)
Visual Studio 2022
If you add AppWindow.Presenter.As<OverlappedPresenter>(); somewhere even without using the result, it fixes the type check and cast
AppWindow.Presenter.As<OverlappedPresenter>();
The text was updated successfully, but these errors were encountered:
Duplicate of #1860.
Workaround is to use .As<T>()
.As<T>()
Sorry, something went wrong.
No branches or pull requests
Describe the bug
AppWindow.Presenter is not recognized as or casted to OverlappedPresenter when changing the framework from Net 8 to Net 9 with PublishAot=true
Steps to reproduce the bug
myButton.Content = AppWindow.Presenter is OverlappedPresenter ? "Yes" : "No";
in MainWindow.xaml.csExpected behavior
The result should be the same
Screenshots
No response
NuGet package version
Windows App SDK 1.6.3: 1.6.250108002
Packaging type
Unpackaged
Windows version
Windows 11 version 24H2 (22621, October 2024 Update), Insider Build (xxxxx)
IDE
Visual Studio 2022
Additional context
If you add
AppWindow.Presenter.As<OverlappedPresenter>();
somewhere even without using the result, it fixes the type check and castThe text was updated successfully, but these errors were encountered: