Problem with excluding files from build causing "error APPX0702: Payload file..."


  • Specifically it is complaining of missing .cso files for .hlsl files which are excluded from build. This feels like a bug.

    There has been some other mention of vaguely similar issues, e.g. http://social.msdn.microsoft.com/Forums/en-US/winappswithcsharp/thread/b20ca4a5-8293-4da7-859e-6759a2a76f9d but searching for the error string has not found anything closer...

    I have a 'compiled out uber shader' type architecture - and we would like to not build the many varations in debug builds.

    Whilst doing this I have noticed that editing the .vcxproj file in Visual Studio with many hundreds or thousands of items selected is cripplingly slow - to the point where I got bored waiting, opened the file in another editor, came up with, tested and debugged regular expressions for every change I wanted to make, then made the changes and saved them long before visual studio is able to change a single setting across all of the files through the UI.

    VS does complete eventually - but it takes an unreasonable length of time for what should be a simple operation.

    It would be nice to fix the speed issues or have a workaround, but for now I can live with using regular expressions - on the other hand this payload file problem seems to just be a bug. Maybe there is some combination of settings I can change to fix it? Even so, every user should expect 'exclude from build' to do what it says on the tin...

    Thursday, March 14, 2013 3:45 PM

All replies

  • Hi Semi,

    Can you explain in more detail what error you are getting and how the files are being used and excluded in the build (can you reproduce this in a minimal sample)? I suspect you still have a dependency on the csos in your project, so you get an error when they aren't built from the excluded hlsl.

    The thread you reference doesn't appear to be related. That was from a pre-release version of Windows and Visual Studio and was about how Xaml controls are laid out. It wouldn't be relevant to shaders.


    Friday, March 15, 2013 1:53 AM
  • I am using the 'exclude from build' option in the properties for the shaders - this stops them from being built, but then it seems to be expecting the build outputs when it comes time to assemble the package at the end of the build.

    I can recreate the problem in a project based on the 'direct3d app' project... create new project and flag 'excluded for build' on the vertex shader, only for release build. Its probably quicker to just do this than for me to try and send an example... (this takes literally 2 minutes).

    the debug build is then fine, but the release build fails:

    C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\AppxPackage\Microsoft.AppXPackage.Targets(926,9): error APPX0702: Payload file 'c:\users\pete\documents\visual studio 2012\Projects\Direct3DApp1\Release\Direct3DApp1\SimpleVertexShader.cso' does not exist.

    although i wouldn't expect the app to work in this state - i don't expect it to fail trying to add the .cso to the package - but perhaps at runtime trying to load the file which it shouldn't have tried to include in the package.

    Tuesday, March 19, 2013 2:52 PM