MSBA-343 · Lesson 9 of 12 · 19 min

Deployable packages and environments

▶ Video coming soon A video version of this lesson is on the way.

A package sitting in a pipeline artifact is not yet useful to anyone. It has to reach an environment, in the right order, at the right time, without breaking whatever is already there. Cobalt Ridge had four kinds of environment, managed in two different places, and Prudence admitted that she was not sure which tool deployed to which. Desmond spent this clinic drawing the map, and then walked the package from the last lesson through it.

Cobalt Ridge's environments

The project's environment plan had been set in the foundation course. Desmond and Prudence each had a unified developer environment, created in the Power Platform admin center with finance and operations apps installed, where X++ runs in the cloud and Visual Studio on the developer's computer connects to it. CONFIG was a sandbox used by Annelise for configuration and functional testing. UAT was a sandbox for user acceptance testing, migration rehearsals and training. Production would be provisioned about three weeks before go-live from the UAT configuration. CONFIG, UAT and production had been deployed through Lifecycle Services, as most finance and operations projects that started before 2026 were.

Two regions. Power Platform admin center: Desmond's and Prudence's unified developer environments, receiving unified packages from Visual Studio or the pipeline. Lifecycle Services: CONFIG and UAT sandboxes and, later, production, receiving Lifecycle Services packages from the asset library. An arrow shows the planned migration of the sandboxes and production to the Power Platform admin center after hypercare.
Where each Cobalt Ridge environment was managed at the end of 2026, and the planned move.

Microsoft has been moving finance and operations environment management from Lifecycle Services to the Power Platform admin center for several years. New environment types, such as unified developer environments and unified sandboxes, are created there. In October 2026, Microsoft announced a public preview of self-service migration for existing environments from Lifecycle Services to the Power Platform admin center. Lesson 10 covers what that means for Cobalt Ridge's plans. For deployment, the practical point was that two deployment paths existed side by side, and the pipeline from lesson 8 produced a package for each.

What a deployable package contains

A deployable package contains the compiled binaries of one or more models, along with the metadata and scripts the deployment needs. Deploying it replaces the named models in the target environment with the versions in the package and then synchronizes the database, so that tables, fields and indexes match the new metadata. A package contains only the models in it. Cobalt Ridge's packages contained only CobaltRidgeCustom; Microsoft's models came from the environment's version, updated separately through service updates.

That separation has two consequences Desmond wanted Prudence to remember. First, a package must have been built against the same or an earlier version of Microsoft's models than the target environment, or it may reference something that does not exist there. The pipeline restored references for the version that UAT and production were running, and Kiri's release calendar made sure UAT was updated before any package built for a newer version was deployed. Second, removing a model from an environment is a deliberate operation, not something that happens because a package leaves it out.

Deploying to developer environments

In the unified developer experience, Prudence deployed her own changes from Visual Studio. Building the project and choosing to deploy it sends the compiled models to her cloud environment and synchronizes the database. She did this many times a day. Desmond also showed her that the nightly unified package could be deployed to a developer environment, which was how a new developer got the current state of CobaltRidgeCustom, or how Prudence reset her environment after experimenting.

Unified packages can be deployed with the Power Platform tools. Microsoft documents a release pipeline in Azure DevOps that uses Power Platform Build Tools: an installer task, a task that checks each service connection, and a deploy package task that deploys the unified package to each environment, with a delay and a manual validation before production. The same deployment can be run from the Power Platform command line. Cobalt Ridge used that pattern for its developer environments and planned to use it for every environment after the migration.

A release stage for a unified environment using Power Platform Build Tools tasks. Connection names and inputs are illustrative; follow Microsoft's current release pipeline tutorial.
# release-unified.yml (sketch, for unified environments)
stages:
- stage: Dev
  jobs:
  - deployment: DeployToDev
    environment: cr-dev-shared
    strategy:
      runOnce:
        deploy:
          steps:
          - task: PowerPlatformToolInstaller@2
          - task: PowerPlatformWhoAmI@2
            inputs:
              PowerPlatformSPN: cr-dev-connection
          - task: PowerPlatformDeployPackage@2
            inputs:
              PowerPlatformSPN: cr-dev-connection
              PackageFile: packages/UnifiedPackage.zip

Deploying to Lifecycle Services environments

For CONFIG and UAT, the Lifecycle Services package took a different route. The release process uploaded it to the project's asset library in Lifecycle Services, as a software deployable package. An environment administrator then opened the environment in Lifecycle Services, chose to apply updates from the maintenance options, selected the package and scheduled the deployment. The environment was unavailable while the package was applied and the database synchronized, so deployments to UAT were scheduled outside training sessions.

Production in Lifecycle Services follows a stricter path. A package must first be applied successfully to a sandbox, typically UAT, and is then marked as a release candidate and scheduled for production in a maintenance window. Microsoft applies it during the window. That rule, that nothing reaches production without first succeeding in a sandbox, matched Kiri's own release process, which added the RSAT run and business sign-off in between.

Deployment paths at Cobalt Ridge.
EnvironmentManaged inPackage formatHow it is deployed
Developer (unified)Power Platform admin centerUnified package or Visual Studio deployFrom Visual Studio, or the deploy package task
CONFIG and UAT sandboxesLifecycle Services, until migratedLifecycle Services packageAsset library, then apply updates on the environment
ProductionLifecycle Services, until migratedLifecycle Services packageRelease candidate from a successful sandbox, in a maintenance window
Any environment after migrationPower Platform admin centerUnified packageRelease pipeline with Power Platform tools

Database synchronization

Every deployment ends with database synchronization, which compares the metadata with the database and makes the database match: creating new tables and fields, changing field properties, creating and dropping indexes. The MB-500 outline asks developers to synchronize and troubleshoot data dictionary changes, and most synchronization problems come from changes that the database cannot make without help.

Desmond listed the dangerous ones. Shortening a string field when existing data is longer fails or truncates. Adding a unique index to a table that already has duplicate values fails. Changing a field's type when data cannot be converted fails. Renaming or deleting a field drops its data. In a developer environment these failures are a nuisance; in UAT during a rehearsal they are an outage. The rule was that any change to the shape of an existing table with data needed an upgrade plan: a data fix script or an upgrade class that ran before synchronization, a test on a copy of UAT data, and a line in the release notes.

The unique index on warranty serial numbers from the first clinic series was an example. It had been added before any data existed. If it had been added after migration loaded twelve hundred warranties, two duplicate serial numbers from the old system would have made synchronization fail. Prudence wrote a query to check for duplicates in UAT before every release that touched the warranty table, and added it to the release checklist.

Configuration is not in the package

Packages carry code and metadata. They do not carry configuration: parameters, number sequences, workflows, security assignments, feature management settings, batch jobs. Annelise moved configuration between environments with data management projects and configuration packages, and Kiri's release notes listed both kinds of change. A release that added a new parameter field, for example, needed the package and a configuration step to set the parameter in each company. If the configuration step was forgotten, the code would run with the field's default value, which was a defect that no build would catch.

Prudence's first instinct was to put default values in code, so the configuration step would not matter. Desmond agreed for safe defaults and disagreed for anything that controlled business behavior, such as whether the inspection check was enabled in CRMX. Those settings belonged in parameters, set deliberately per company, with the release notes saying who sets them.

The release calendar

Kiri's calendar tied it together. Packages from main went to CONFIG after approval for functional testing. Release branches went to UAT for the RSAT suite and user acceptance. After sign-off, the same package, not a rebuild, became the production release candidate. Production deployments happened in a weekly maintenance window outside business hours in both time zones, with a rollback plan: redeploying the previous package and, if data had changed shape, restoring from a point-in-time copy, which needed the administrator and could only be done for a limited period after the deployment.

Before go-live there was no production to deploy to; production would be provisioned from UAT's configuration. After go-live, Kiri wanted the first months of releases kept small and frequent rather than large and rare, so that each change was easy to test and, if needed, to undo.

Hotfixes

After go-live, some fixes cannot wait for the next release. Kiri's process for a hotfix used the branches from lesson 8. A hotfix branch was created from the release branch that production was running, the fix was made and reviewed there, and the pipeline built a package from it. The package went to UAT first, with a short RSAT run of the affected chain, and then to production in the next maintenance window, or in an emergency window approved by Kiri and Thandeka. The fix was then merged into main, so that the next regular release did not undo it. Desmond insisted on the last step because forgetting it is how the same bug comes back a month later.

Refreshing sandboxes

Code moves up from developer environments to production. Data moves the other way. Before testing a release, Annelise often wanted UAT to hold recent data, which meant refreshing it with a copy of another environment's database. Before go-live, UAT was refreshed from itself between rehearsals; after go-live, UAT would be refreshed from production. Database copies are a lifecycle operation that administrators perform in Lifecycle Services or, after migration, in the Power Platform admin center.

A refreshed sandbox is not ready to use until it has been cleaned. Desmond's refresh checklist disabled integrations that pointed at real external systems, so that UAT would not send business events to the plant quality system's production endpoint; switched off batch jobs that would email suppliers; checked that users who should not have access to production data in a sandbox had been removed; and reset the Application Insights connection so that UAT telemetry did not mix with production. Lesson 11 explains why that last point matters.

The deployment runbook

Every deployment to UAT and production followed a written runbook, which Kiri kept with the release notes. It listed the package and its build number, the configuration steps and who performed them, the data checks to run before synchronization, the expected downtime, the smoke tests to run afterwards, the RSAT chains to run, and the rollback plan. The runbook was boring on purpose. A deployment that depends on someone remembering a step at night is a deployment that will one day miss it.

Prudence wrote the first runbook herself, for the release that carried the receipt fixes from lesson 12, and Kiri reviewed it line by line. Two lines changed. Kiri moved the duplicate check on the certificate table earlier, so that a failure would be found before the maintenance window began rather than during it. Annelise added the name of the key user at each plant who would confirm, after the smoke tests, that receiving worked with a real order. Desmond said that was the point of writing it down: three people improved a plan that only one of them would have carried in their head. The approved runbook became the template for every later release, and each release's copy was stored with its build so that anyone could see later exactly what had been done.

Worked problem

Planning a release that adds a field and a unique index

Release 2027.02 adds a supplier batch field to CRInspectionCertTable and a unique index on supplier and certificate number. UAT already holds migrated certificates. How should Prudence prepare the deployment?

Show solution
  1. Query UAT for duplicate supplier and certificate number pairs before building the release, and agree a data fix with Annelise for any found.
  2. Test the package on a developer environment loaded with a copy of UAT certificates to confirm that synchronization succeeds.
  3. Build the release branch in the pipeline and deploy the Lifecycle Services package to UAT through the asset library outside training hours.
  4. Run the RSAT receipt chain and the certificate tests, and record the results against the release.
  5. Mark the same package as the production release candidate and schedule it in the maintenance window, with the duplicate check repeated on production first.

Answer: Checking data before adding a unique index, testing synchronization on realistic data and promoting the exact package that passed UAT avoids the most common causes of failed deployments.

Common mistakes

  • MistakeRebuilding the code for production after UAT sign-off.

    InsteadPromote the exact package that passed UAT.

  • MistakeAdding a unique index without checking existing data.

    InsteadCheck for duplicates and fix them before deployment.

  • MistakeExpecting the package to carry parameters and number sequences.

    InsteadMove configuration separately and list it in the release notes.

  • MistakeDeploying a package built against a newer version than the target environment.

    InsteadBuild against the version the target runs, and update environments first.

Summary and key terms

  • Deployable packages contain compiled models and replace those models in the target, followed by database synchronization.
  • Unified environments in the Power Platform admin center take unified packages from Visual Studio or Power Platform tools.
  • Lifecycle Services environments take packages from the asset library, and production only after a successful sandbox deployment.
  • Synchronization changes such as shorter fields, new unique indexes and type changes need upgrade plans and tests on realistic data.
  • Configuration is moved separately from packages, and the same package is promoted from UAT to production.
Asset library
The Lifecycle Services store for files such as deployable packages.
Database synchronization
The step that makes database tables, fields and indexes match deployed metadata.
Release candidate
A package that has succeeded in a sandbox and is approved for production.
Unified developer environment
A developer environment in the Power Platform admin center where X++ runs in the cloud.
Maintenance window
An agreed time when an environment can be unavailable for updates or deployments.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. What does a deployable package not contain?

    Show answer

    Configuration data such as parameters, number sequences and workflows.

  2. Which task deploys a unified package in Microsoft's Azure DevOps release tutorial?

    Show answer

    PowerPlatformDeployPackage@2.

  3. Why check for duplicates before adding a unique index?

    Show answer

    Synchronization fails if existing data violates the index.

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz