Folder Based Deployment

Xbox One titles can be deployed to a folder on the Title Scratch drive, allowing multiple versions of a package to co-exist on a single console. These folders can be the target of file copy and deployment commands and the AppxManifest.xml within them can be registered to become the active version of a title for launch. Deploying a title using this method can be as simple as:

robocopy c:\mygame\layout \\myconsole\titlescratch\mygame\version1 /MIR
xbapp register \mygame\version1\  

Titles deployed in this manner will exist on the console along with the deployment XVDs/XVCs that are created implicitly by existing tools and commands. Care should be taken in combining folder deployment with other deployment methods for a single title as the registrations will overwrite each other, and may cause unintended un-installation of a streamed or push deployed title as noted below.

Only a single version of the title may be registered at a time, and this will be the version that is executed when the title is launched. The registered version may be changed explicitly by registering a new version directly or implicitly by, for example, Push deploying another version of a title.

A limitation of this deployment approach is that registration or uninstallation of a title deployed in a folder will cause any ERA running on the target development console to shut down. This is due to the title scratch drive being mounted into the game OS of any running ERA. It mimics the current behavior of a deployment to a running title to cause that title to shut down, but will cause shutdown of any running ERA regardless of identity.

Approaches to Folder Based Deployment

Visual Studio Deployment

You can configure your Visual Studio project to deploy to a folder instead of an XVD container.

Workflow

  1. In Visual Studio, open your solution.
  2. In Solution Explorer, right click your project name and select Properties
  3. In the left tree of the resulting Property Page dialog, select Xbox One and then Deploy
  4. In the main pane choose the Deploy Mode as Push (Run from DevKit)
  5. In the property Scratch Deploy Path enter the path of the folder you wish to deploy to relative to the root of the title scratch drive.

Note This feature allows multiple developers to more easily share a single console by setting the Scratch Deploy Path property to a value that is unique to their Dev PC – for example: games\($username)

Command Line Deployment Tools

You can use the new version of the existing command line tools, Deploy (xbdeploy.exe) and Application Management (xbapp.exe).

Workflow

  1. Open an Xbox One XDK command prompt from Start.
  2. Use either of the command line options below to move your title from the development PC (or other accessible network location) to the Dev Kit:
    • Deploy (xbdeploy.exe) specifying a target folder with the /f switch
      xbdeploy push app_path [/s:file_path] [/f:<folder path relative to TitleScratch root>] [/vm]  [/X[:]address[+<accesskey>] ]  
      
    • Application Management (xbapp.exe) deploy specifying a target folder with the /f switch
      xbapp deploy [/s] [/v] [/f:<folder path relative to TitleScratch root>] [/X[:]address] app_path  
      

      These commands will register the deployed version of the title, unregistering any existing version of the same title that was deployed to a folder or uninstalling any version that was deployed to an XVD/XVC (for example, via streaming install or from the Optical Disk Drive (ODD)).

Manual Deployment and Registration

You can use any file copy commands (for example xcopy or robocopy), file explorer (for example, drag and drop to the network share) or automation scripts to copy a version of your title to the title scratch drive of your development kit, and then register it with the xbapp register command if you want to launch it.

Workflow

  1. Copy versions of your title to the Title Scratch drive of your development kit. For example:
    robocopy c:\mygame\lkg \\myconsole\titlescratch\mygame\lkg /MIR
    robocopy c:\mygame\perf \\myconsole\titlescratch\mygame\perf /MIR  
    
  2. Register the version of the game you want to launch:
    xbapp register \Mygame\Perf\  
    

Combining Deployment Methods

You can combine deployment methods to optimize your workflow during development. You may, for example, use automation scripts to file copy deploy to a folder and then register a nightly build on all development kits in a lab, while individual developers are using the VS integration to Push deploy to another folder, and then quickly switching between the versions via registration to compare their local changes to the last nightly build without requiring lengthy re-deployments. Another example is to configure a Pull deployment in the scenario above to allow faster validation of changes local to the Dev PC. Starting the pull session will not delete the folder based deployment of the nightly build, and the developer can switch back to this build quickly by registering it, which will terminate the pull session and make the nightly build version launch-able. When they are done with that build, they can then re-start the Pull session and be back working with their local changes in a few minutes. This is repeatable throughout the day, without the need for lengthy waits to repeatedly push large builds to the dev kit.

Console Extensions

The Devkit Console Extensions library includes APIs that allow you to register and unregister a particular version of your application. For more information, see the Microsoft.Xbox.Tools.ConsoleExtensions Namespace section.

See also

Xbox One Deployment

Xbox One Deployment White Paper

Deploy (xbdeploy.exe)