Deployment Errors

Configuration and deployment checks may cause the following deployment error in Visual Studio: Files for Configuration='Debug' are either not built, or not completely copied to the layout directory. Build required to proceed. Resolve this error as follows.

Background:

Visual Studio deployment peforms a set of checks to ensure that the VS Configuration that you selected to build and deploy (such as Debug or Release) is the one that will actually get deployed from the Durango\Layout\Image\Loose folder. These checks address issues that were caused by deploying partially built configurations – trying to deploy a partially built configuration can lead to hard-to-diagnose app registration issues or crashes. Examples included:

This particularly appears to be a problem when you switch from one build configuration to another and then try to deploy without doing a re-build.

While these checks help tremendously for those who rely solely on the Xbox One project system to ensure everything is properly updated, it can cause problems in custom build environments. This note explains how to diagnose and fix those issues. If you run into issues that are not easily addressed, please contact GameDS or your DAM for help.

The checks are managed through the XML files that are generated by the build system in the Durango\Layout\Contributors directory. If IsolatedConfiguration=No, there is one file for all configurations. If IsolatedConfiguration=Yes, there is one file per configuration.

Each XML file lists the files that should be in the Durango\Layout\Image\Loose directory for a particular configuration, and the source for that file. For example:

<Contributor ComponentSource="c:\scratch\d\xdk\samples\setfastresources_06_2014\graphics\setfastresources\setfastresources110.vcxproj_release">
  <Configuration Name="Release">
    <File Source="C:\XDK\Samples\SetFastResources_06_2014\graphics\SetFastResources\Durango\Release110\bin\appdata.bin">C:\XDK\Samples\SetFastResources_06_2014\graphics\SetFastResources\Durango\Layout\Image\Loose\appdata.bin</File>
    <File Source="C:\XDK\Samples\SetFastResources_06_2014\graphics\SetFastResources\Durango\Release110\bin\appdata.bin">C:\XDK\Samples\SetFastResources_06_2014\graphics\SetFastResources\Durango\Layout\Image\Loose\appdata.bin</File>
    ... 
    <File Source="C:\XDK\Samples\SetFastResources_06_2014\graphics\SetFastResources\Durango\Release110\bin\Media\Textures\ATGStoreLogo.png">C:\XDK\Samples\SetFastResources_06_2014\graphics\SetFastResources\Durango\Layout\Image\Loose\Media\Textures\ATGStoreLogo.png</File>
  </Configuration>
</Contributor>  

If the file does not exist or needs updating, it is copied from the Source to the Durango\Layout\Image\Loose folder. If the Source file does not exist or the Configuration file is empty (because you are building using a custom build process), deployment will fail with an error similar to this error:

Expected file in OutputDir 'missing.txt' does not exist.

Files for Configuration='Debug' are either not built, or not completely copied to the layout directory. Build required to proceed.

Diagnosing issues:

This issue is typically caused by one of the following:

Possible cause How to fix
A developer switched between configurations, and the new configuration has not been built. Rebuild, then deploy again.
The configuration being deployed has files missing. Fix the build system to ensure that the missing files are being built. The error message should indicate what is missing. If not, check the Source and Target parameters defined in the Contributors configuration file (see this forums thread for details)
The same location is used for the intermediary directory (IntDir) and the output directory (OutDir). Use different locations for IntDir and OutDir.
A developer changed the value of the IsolatedConfiguration build parameter (No to Yes, Yes to No). Delete the Durango\Layout folder and rebuild the project.
A developer is using a custom build process that does not update the Contributors configuration file. Update the custom build process to generate a valid Configurations file. Alternatively, you can opt out of the additional deployment configuration checks; see “Opting out of the additional checks” below.

Opting out of the additional checks:

You can opt out of these additional checks using the DisableConfigurationRefresh property.

Caution Be careful when using the DisableConfigurationRefresh property. Turning off these checks means that the Visual Studio build system is not validating that the content of the Image\Loose folder is correct before starting deployment, and so you can run into exactly the types of hard-to-diagnose issues that these checks are designed to prevent. Before using this property, make sure that your build process is correct, and that switching between configurations will not leave the Image\Loose folder in an incorrect state.

To add this property, open your project file in a text editor. In the Globals property group, add an entry for <DisableConfigurationRefresh>true</DisableConfigurationRefresh>. For example:

<PropertyGroup Label="Globals">
  <ApplicationEnvironment>title</ApplicationEnvironment>
  <RootNamespace>SetFastResources</RootNamespace>
  <VCTargetsPath Condition="'$(VCTargetsPath11)' != '' and '$(VSVersion)' == '' and '$(VisualStudioVersion)' == ''">$(VCTargetsPath11)</VCTargetsPath>
  <DefaultLanguage>en-US</DefaultLanguage>
  <ProjectGuid>{25D7897B-1E8D-439B-936F-BB68D477B790}</ProjectGuid>
  <Keyword>Win32Proj</Keyword>
  <AppUserModelId>SetFastResources110_1.0.0.0___f8q8t5mzxvsas!SetFastResources110.App</AppUserModelId>
  <ProjectName>SetFastResources110</ProjectName>
 
  <!-- Disable Deployment configuration checks  -->
  <DisableConfigurationRefresh>true</DisableConfigurationRefresh>
 
</PropertyGroup>  

Gathering XTF logs for title deployment and launch failures

Here are some steps to enable verbose logging on development PC and devkit for the deployment process:

  1. Open an XDK Command Prompt on the PC
  2. Connect to the console by running this command:
    xbconnect.exe <console IP>  
    
  3. Enable verbose logging on the console by running this command:
    xbconfig.exe ToolsLogLevel=Verbose  
    

    Note You can ignore the text that says you need to reboot the console for the change to take effect.

  4. Enable verbose logging on the PC by setting the following environment variables:
    set XTF_LOG_LEVEL=5  
    
    set XTF_LOG_FILE=<path on your PC to create the log file>  
    

You can disable XTF logging by running these commands:

The following paths may contain useful information for debugging information: