ProgressBar and ProgressRing controls are not working in SDK 1.1 preview 3
See original GitHub issueDescribe the bug
If I include ProgressBar or ProgressRing control on the Window, the app simple does not load. And also the error is not meaningful.
I used the simple XAML:
<ProgressBar Width="130" Value="0" />
Error:
Unhandled exception at 0x5BE8BAC9 (Microsoft.ui.xaml.dll) in App3.exe: 0xC000027B: An application-internal exception has occurred (parameters: 0x122D8960, 0x00000002).
Steps to reproduce the bug
- Create a new Blank App in WinUI 3 C# with SDK 1.1 Preview 3.
- Add a ProgressRing or ProgressBar control on the MainWindow.
- Run the app
Expected behavior
The app should start normally when ProgressBar or ProgressRing control is added.
Screenshots
Can’t add screenshot as the app is not starting.
NuGet package version
WinUI 3 - Windows App SDK 1.1 Preview 3: 1.1.0-preview3
Windows app type
- UWP
- Win32
Device form factor
Desktop
Windows version
Windows 11 (21H2): Build 22000
Additional context
No response
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:13 (10 by maintainers)
Top Results From Across the Web
ProgressBar Class - Windows App SDK
A ProgressBar control visually indicates progress of an operation with one of two styles: a bar that displays a repeating pattern, or a...
Read more >WinUI ProgressRing Don't Show on WASM (Uno 2.4)
To use the ProgressRing control, your project heads need to have a reference to the Uno.UI.Lottie package. The rendering of this control is ......
Read more >ProgressRing
ProgressRing - "WUX ProgressRing " - implementation based on the built-in control in Universal Windows Platform, with support for both native & UWP...
Read more >Changelog
Changelog. Shoelace follows Semantic Versioning. Breaking changes in components with the Stable badge will not be accepted until the next major version.
Read more >Stable channel release notes for the Windows App SDK
Fixed an issue where the mouse would sometimes stop working when a dialog ... Check out the 1.1 Preview 3 release notes for...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

This issue was fixed and released in Windows App SDK 1.1.3 - check out the release notes and NuGet to try it out 🎉
@hassaanmasood thanks for reporting this issue. The problem is understood and I have a fix available internally.
This issue is hit whenever a ProgressRing, ProgressBar (or a few other controls) are created when Microsoft.Windows.SDK.NET.dll is not already loaded into the process. So it is possible to work-around this issue by forcing Microsoft.Windows.SDK.NET.dll to be loaded before your page/wndow loads. I was able to do this by adding a line of code to my window’s ctor:
Even though this line of code doesn’t really do anything, it does have the effect of getting Microsoft.Windows.SDK.NET.dll loaded into the process and so you no longer hit a problem with ProgressRing or ProgressBar. It doesn’t have to be this specific line of code, anything that forces the dll to load should suffice.