I have a Xamarin solution with a UWP project in it. I cannot understand how to copy a file that is in my VS project to the UWP LocalFolder. I've tried fiddling with the file's Build Action (Compile, Content, Embedded Resource, AdditionalFiles) and I've tried to manually create this location.
Apparently this code:
Windows.Storage.StorageFolder appDataFolder = Windows.Storage.ApplicationData.Current.LocalFolder;
string fileName = (appDataFolder.Path + "\\HighScore.csv");
Creates this path:
'C:\Users\<my Name>\AppData\Local\Packages\ebf29fcf-0080-4b4c-b873-78fd1340811d_9tywq191txc1p\LocalState\HighScore.csv'
So I just need to figure out how to get the CSV file that's in my project to this LocalState folder. Any help appreciated.
Package.InstallLocation
and you will need to manually copy toLocalFolder
if you need to modify the file at runtime. – Peter Torr - MSFT