Why does CachedFileManager.DeferUpdates(file) throw an exception when the file is located on a ONEDRIVE folder?

Groovykool 236 Reputation points
2023-06-05T16:24:34.4666667+00:00
Universal Windows Platform (UWP)
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,179 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Matthias 0 Reputation points
    2023-10-20T18:01:23.25+00:00

    @Junjie Zhu - MSFT

    Hello I face the same problem. I am the application developer and I do not know what I could do more than contact you here. Documentation of the method CachedFileManager.DeferUpdates(file) does not specify it could throw any exception.

    Users under Windows 10, does not experience any issues.

    Tests with Windows 11 (22621.2428) and OneDrive (23.199.0924.0001 (64-bit)):

    • Exception happens when OneDrive is on, when OneDrive is paused or OneDrive program is closed.
    • Exception does not happen on any location that is not configured with OneDrive sync. (Tested user directories, SD card locations, other hard drive).

    Tests with Windows 11 (25967.1010) and OneDrive (23.211.1010.0001 (64-bit)):

    • Exception does not happen when OneDrive is on, when OneDrive is paused or OneDrive program is closed.
    • Exception does not happen on any location that is not configured with OneDrive sync. (Tested user directories, SD card locations, other hard drive).

    I wanted to post comment, but made answer by mistake. It looks like the preview version of Windows 11 or OneDrive contains the improve for the problem. Any idea what it is and when it will be released to the users?User's image