Roman Pfneudl
Roman Pfneudl

Reputation: 717

VS2015: recursively adding external content directories to AppX

I try to add a folder and its subfolders (~4000 files) as content to a C++ windows store app (in VS2015).

Heres the scenario:

G:\Game -> is the build directory
D:\data -> holds the original content

I've read there are some methods to declare external content in the .vxcproj file like that:

<ItemGroup>
  <Content Include="D:\**">
    <Link>%(RecursiveDir)%(FileName)%(Extension)</Link>
    <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    <DeploymentContent>true</DeploymentContent>
  </Content>
</ItemGroup>

This actually copies the contents of D:\data into the build-directory (G:\Game). This is great since the program can now be run & debugged. BUT: as soon as i deploy the project to the AppX Folder (G:\Game\AppX) the data-folder doesnt get deployed there.

G:\Game\game.exe
G:\Game\data\...
G:\Game\AppX
G:\Game\AppX\game.exe
(G:\Game\AppX\data\...   - missing)

Any clues ?

Upvotes: 0

Views: 98

Answers (1)

Roman Pfneudl
Roman Pfneudl

Reputation: 717

After fiddling around for days, as of now i can state there is no way to do this properly in the Visual C++ - IDE (2012 / 2015) (it seemed to work with C# projects though).

The only way to achieve what i wanted to do is

  1. a post-build-event using robocopy to copy/synch the data over to the AppX folder
  2. Writing a script for the packaging / signing using MakeAppX.exe, SignTool.exe and 7-zip.

Upvotes: 0

Related Questions