ObservableCollection does not work for Microsoft Store version while working for debug version

Hong 1,566 Reputation points
2026-09-11T00:59:55.15+00:00

The following code is solely for debugging.

Xaml:

        <ListView x:Name="listViewTest"/>

C#:

                var folders = new ObservableCollection<string>
                    {
                        "OBS 1",
                        "OBS 2",
                        "OBS 3"
                    };

                listViewTest.ItemsSource = folders;

This works exactly as expected if the WinUI app is started from VS2026, but the store version built by VS2026 shows nothing.

The following works for both the debug version and the store version:

                var folders = new c<string>
                    {
                        "OBS 1",
                        "OBS 2",
                        "OBS 3"
                    };

                listViewTest.ItemsSource = folders.ToList();

My app has a slightly complex list, and it works flawlessly with the debug version, but not with the store version. It took me many hours to narrow it down to ObservableCollection.

Could anyone shed some light on this?

User's image

Windows development | WinUI
0 comments No comments

1 answer

Sort by: Oldest
  1. Jay Pham (WICLOUD CORPORATION) 4,435 Reputation points Microsoft External Staff Moderator
    2026-09-11T01:39:07.99+00:00

    I am working the issue and will provide an update soon. Thank you for your patience.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.