问题
I have a large folder structure with a ton of subfolders that I am using for application data in my UWP app. When testing, I can just have it sitting on disk and it's fine, but when I make a store package, I need to be able to copy that data in. The only way I've found to include assets is to manually add individual files into Visual Studio and set them to be "Content". Is there a way to copy in an entire folder as "Content" and preserve its folder structure?
回答1:
You don't have to manually add all the files. Add the entire folder inside the UWP app folder. Once you do that you should be able to use the Show All Files
option in the solution explorer and add the entire folder. If the property of the added files is not already set to "Content", multi select the files and set the Build Action
property in the Properties
window to Content
[
][
]来源:https://stackoverflow.com/questions/32144287/copying-assets-into-uwp-application-package