Forum Discussion

Keston_O's avatar
Keston_O
Copper Contributor
Feb 28, 2023

AppData output inconsistencies

Problem Statement: My application uses MSFT logging hooked up to a Serilog provider. It outputs a log file to AppData. We want this file to be generally accessible to the user for support, even when deployed through MSIX.

 

What I'm seeing: On my dev machine (Windows 19044.2604), when I install and run the app, when it writes a file to Environment.SpecialFolder.ApplicationData, I can see the file when I navigate to C:\users\<user>\AppData\Roaming. This is great.

 

However, on my test machine (Windows 22621.1265) I see nothing output in C:\users\<user>\AppData\Roaming, but I see output in C:\users\<user>\AppData\Local\Packages\<long package name that looks like a guid>\LocalCache\Roaming. This is technically accessible, but not something we can readily guide the user to. 

 

I'm confused about the discrepancy here. Is there a way to make the app act like the first case in all circumstances or, alternatively, a better path we can output to that will not get munged?

 

My setup: 

Here is the relevant portion of the generated AppxManifest.xml 

 

 

I'm not including any virtualized system folders or registry entries in my msix at this point. 

 

 

No RepliesBe the first to reply

Resources