1

I have a Windows 8 Metro project, and intend to use the WindowsApplicationModel.Store.CurrentApp and CurrentAppSimulator classes to implement trial mode.

In the build we release to the store, the app must not reference CurrentAppSimulator.

My first idea was to include my trial-mode.xml to feed to ReloadSimulatorFile async in my project, but mark it with a Build Action: None, and Copy to Output Directory: Always

I then tried to open the file with

var package = Windows.ApplicationModel.Package.Current;
var sfolder = package.InstalledLocation;
var sfolder2 = await sfolder.GetFolderAsync("Assets/data");
var sfile = await sfolder2.GetFileAsync("trial-mode.xml");

however, this fails to find the file, which doesn't appear in the output folder.

So two questions. What does Copy to Output Directory actually do, and secondly is there a way to conditionally include the file, as I don't really want to ship trial-mode.xml in the final build.

4

0 回答 0