Answer the question
In order to leave comments, you need to log in
How to save user data from C# in modern windows applications (store, msix)?
I have an application (.net core 3.1) that is packaged with msix and needs to be distributed via the windows store. When I run the application, I need to download some files from the internet. Where can they be saved?
The documentation only says that the application runs in an isolated container. I have tried writing to
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)
, but I get aceess denied. On the test machine, this path resolves to C:\Program Files\WindowsApps\...
, and you cannot write there.
Answer the question
In order to leave comments, you need to log in
UWP has a function that returns a writable folder. But my program itself is written in .net core, so this option is no longer available. The fact that it runs as UWP doesn't help.
Found documentation that describes two methods:
Environment.SpecialFolder
;SpecialFolder
to add all the necessary files to the package.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question