Loading...
Area: Episerver Customer-Centric DXP
Applies to versions: Not applicable

Code package format

This topic describes how to create code packages when deploying through the Deployment API for Episerver Customer-Centric Digital Experience Platform (DXP).

Code package naming convention

The first step to use the API is to bundle your web application into a code package. Use the following conventions when you name a code package (a package containing web app binaries, configuration and so on).

<app name>.<package type>.app.<version>.nupkg
  • App name. Optional.
  • Package types. Values are:
    • cms (primary web app)
    • commerce (commerce manager)
  • Version. You can specify in different ways such as using a "date format" or a version number.

Examples

cms.app.1.0.0.nupkg
customer.cms.app.1.0.0.nupkg ("customer" being the "app name")
commerce.app.20190311103000.nupkg (version defined in a date/time format)

Code package content

The package should contain the web app-related files, which normally exists at the path D:\Home\Site on the actual Azure Web App.

Only folders and files related to the code are allowed (that is, wwwroot, applicationHost.xdt), and a metadata file (optional) that should follow the package name.

Sample folder structure

  • myapp.cms.app.1.0.0.nupkg
    • wwwroot
      • App_Data
        • jobs
          • continuous
            • WebJob
              • Run.cmd
              • ...
              • ...
              • ...
      • Web.config
      • Web.Integration.config
      • Web.Preproduction.config
      • Web.Production.config
    • applicationHost.xdt
    • applicationHost.Preproduction.xdt
    • applicationHost.Production.xdt
    • myapp.cms.app.nuspec (optional)

Transforms in any target environment need to be a part of the initial code package.

You can download a CMS sample site (Alloy) package example here: alloy.cms.app.1.2.1.nupkg

Creating a code package

You can create a package by deploying to a folder and zipping this folder.

Example:

msbuild /p:Configuration=Release;DeployOnBuild=True;DeployDefaultTarget=WebPublish;WebPublishMethod=FileSystem;PublishProvider=FileSystem;LastUsedBuildConfiguration=Release;ExcludeApp_Data=False;publishUrl=..\SitePackageContent\wwwroot;DeleteExistingFiles=False

You can zip this folder (SitePackageContent in the example) as cms.app.1.0.0.nupkg  to make it a deployment package that you can use in DXP.

Do you find this information helpful? Please log in to provide feedback.

Last updated: Apr 02, 2020