GetFoldersAsync gives exception in an AppData subfolder in Windows 2004

Jos Huybrighs 336 Reputation points
2020-10-13T12:55:47.847+00:00

I have a strange problem with my UWP DesktopBridge app where GetFoldersAsync called with a StorageFolder that is set to a subfolder in AppData/Local returns an exception "Value does not fall within the expected range". The StorageFolder is setup through a folder picker and the GetFoldersAsync call is simply to list all subfolders.
The error does not occur on Windows 1909 but comes up on Windows 2004, and (not fully tested) only for folders inside AppData.

Universal Windows Platform (UWP)
{count} votes

Your answer

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