Universal Windows Platform (UWP)
A Microsoft platform for building and publishing apps for Windows desktop devices.
2,527 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
when i am trying to use Search Query Options & get items count from AppData folder (Path: C:\Users\mine\AppData\Local\Packages) an exception, please see attached image,
not sure what is the issue with my code, any clue ?
Make sure you select 'AppData' folder (C:\Users\mine\AppData)
The resources you share contain your personal privacy, and I have deleted the link in your comment. I have reproduced the problem using my project.
AppData is for caches and app metadata, AppData folder is hidden by default on win11. This issue seems to be a system behavior. I will discuss this with the team.
Thanks Junjie, i will await your update on the resolution of the issue.
is there any update @Junjie Zhu - MSFT ?
I have asked the team and will update below if there is a reply.
ok, i hope they respond soon.
@Junjie Zhu - MSFT looks like it might take brief time till they respond, is there any alternate way to fetch files with specific filters such as files with specific extensions, having specific size in deep folder search way with out using query options ?
Sign in to comment
1 answer
Sort by: Most helpful
I don't know anything about this method but the error itself indicates you are using query options that are invalid. Looking at the documentation for the method I notice it is inconsistent as to what is allowed making this really hard to figure out. However it does mention the AreQueryOptionsSupported method that you can call to confirm that the options you want to use are valid for the given folder. I recommend you call this method with your configured options first and see if it returns success. If it says they are valid then the subsequent call should be fine. If not then your query options are incorrect for the folder you're trying to use.
thanks for the suggestion, i tried using AreQueryOptionsSupported method, it returned "True" but still the same exception.
i tried using AreQueryOptionsSupported method for selected folder, it returned "True" but still same exception.
View the details of the exception. In the details you should see the argument name it doesn't like along with the callstack. That might provide more details as to what is going on.
Sign in to comment
Activity