Set up a Visual Studio 2017 build agent to build Modern POS

Important

Support for the Retail SDK will end in October 2023. Please use or migrate to the Commerce SDK, which provides several benefits including a simplified development and update experience, and improved performance.

This article explains how to set up a self-hosted Microsoft Visual Studio build agent to build Dynamics 365 Commerce Modern POS (MPOS) in an Azure DevOps pipeline.

Create and configure the self-hosted Visual Studio build agent to build MPOS extensions in an Azure DevOps build pipeline

To create and configure the self-hosted Visual Studio build agent to build MPOS extensions in an Azure DevOps build pipeline, follow these steps.

  1. In the Azure portal, create a new virtual machine (VM) that uses the Windows Server 2022 Datacenter image.

    Note

    You don't have to provision a new VM. You can use the existing VMs or build VMs that have been provisioned in Microsoft Dynamics Lifecycle Services (LCS).

  2. On the VM, install Visual Studio 2017 and other prerequisites. For more information, see Retail software development kit (SDK).

  3. In the Azure DevOps project, create a personal access token to authenticate the agent. For more information, see Authenticate with a personal access token (PAT).

  4. Download the build agent, and install it on the VM that you created. For detailed information about how to download and configure the agent, see Download and configure the agent.

    Build agent setup.

  5. Update the Azure DevOps pipeline so that it uses the new build agent pool. In the pipeline, in the Agent pool field, select the agent pool where you added the build agent that you configured earlier.

    Pipeline configuration.

    Note

    The same build agent can be used to build other Dynamics 365 Commerce extensions.

  6. Save the pipeline, and validate the changes by queuing a new build.

Frequently asked questions

Why can't I use an Azure DevOps hosted agent?

Only Visual Studio 2017 can be used to compile MPOS. If you're using an Azure DevOps build pipeline, the build agent specification must be vs2017-win2016. As of March 2022, the Windows Server 2016 image that includes Visual Studio 2017 will be deprecated. This deprecation will affect Azure DevOps pipelines that use that build agent. You will no longer be able to build and package MPOS extensions.

To mitigate this issue, use a self-hosted build agent in the Azure DevOps build pipeline to build MPOS extensions.