问题
I am building an app for windows store and I need some default and example data to be in the localstate folder (Windows.Storage.ApplicationData.current.localFolder
) when the app run the first time.
The folder and files structure is a bit complex and I tryed to copy the files at the start of the application, but I can't manage that way.
Is it possible to have files being copied automatically from the installation folder to the localstate folder during the store app installation?
回答1:
Unfortunately, customization of the app install process isn't currently supported. You have to do this as part of your first run processing.
One possibility is that you include the data in your package as a .ZIP or other compressed file and use an appropriate library to expand that file into a folder structure on startup. That could simplify your logic considerably. (I don't have a library to recommend; it's just an idea.)
来源:https://stackoverflow.com/questions/25603914/deploy-files-in-the-localstate-folder-during-installation-of-a-store-app