locked
Content deployment, problem with "cache" refresh

    Question

  • Hi,

    For convenience reason, I've configured my windows store project in a way that a custom build step put some needed files into a directory declared as content output, with the option "Treat output as content" enabled. So I don't have to put all my assets in the .vcxproj directly, which is great.

    But issues occur, for example, if in the output directory a brand new file is put by the custom build step. The application deployment doesn't "see" it directly. I need about 2 or 3 launches, or to manually change the "Outputs" property of the custom build step with fake modifications, to have it working correctly. It works like if there was a kind of "deployment cache" which doesn't look after any content directory modification at launch.

    How can I solve this ?

    Thanks for help.

    Tuesday, April 16, 2013 7:53 AM

All replies

  • Hi DZ433,

    Can you provide more details on how your project is configured? What sort of project is it? What exactly is does the custom build step work, etc.? Can you provide either a minimal repro solution that demonstrates the problem or a sufficiently detailed description that we can duplicate it here?

    If you build and deploy the project do you see the files copied appropriately, or does that take several iterations? 

    --Rob 

    Wednesday, April 17, 2013 1:59 AM
    Moderator
  • Hi Rob, Thanks for your answer.

    I'll try to give more details and to be as clear as possible :

    The project is a directX based windows store .exe application. During the custom build step, I run a .bat that copy several files into a specific directory (call it "AppContent" for the example). The custom build step properties are something like :

    Command Line : myBatch.bat
    Outputs: $(ProjectDir)..\AppContent\
    Additional Dependencies : ($ProjectDir);$(ProjectDir)..\AppContent\
    Treat Output As Content : Yes
    Execute After : PostBuildEvent

    When myBatch.bat copies a brand new file to AppContent folder that wasn't here before, after deploy, this files is not in the generated "Appx" folder.
    If I manually update the "Outputs" property field with anything (just adding a space or semicolon then removing it, just to ensure the properties are modified and saved), then all works fine, the deploy will copy the new file to "Appx".

    Thanks for help.

    Wednesday, April 17, 2013 8:35 AM