Compile the sample Commerce Engine

Version: 10.2

You can customize the Sitecore XC Engine, using the SDK package provided in the release package.

When you make changes to the Sitecore XC Engine (using the SDK), you must re-compile the Commerce Engine.

To compile and package the Sitecore XC Engine using the command line method (recommended):

  1. Start a command prompt as administrator and go to the Sitecore Commerce Engine SDK root directory (that is, where you extracted the SDK zip file).

  2. Run the following command:

    dotnet.exe restore Customer.Sample.Solution.sln

    Note

    The default dotnet path is "C:\Program Files\dotnet\dotnet.exe". You must specify the solution name because there are two .sln files under the Engine SDK root directory.

  3. Run the following command:

    dotnet.exe publish Customer.Sample.Solution.sln -o <output-dir>

    Note

    Make sure that the installed version of the .NET Framework is the DevPack/SDK edition, not the Runtime edition. The dotnet publish command fails if only the Runtime edition is installed.

  4. Zip the contents of the output folder (where you published the Customer.Sample.Solution). Make sure that the root of the .ZIP file contains the compiled DLLs and folders, for example:

    Folder structure and compiled DLLs.
  5. Copy the zipped Sitecore.Experience.Commerce.Engine.*.zip file to your deployment root.

To compile and package the Sitecore XC Engine using Visual Studio:

  1. Launch Visual Studio.

  2. From the Sitecore Commerce Engine SDK folder, open the Customer.Sample.Solution.sln file

  3. To build the solution, on the menu bar, click Build.

  4. To publish the Sitecore.Commerce.Engine project to your file system, click Publish.

  5. Zip the contents of the output folder (where you published the Customer.Sample.Solution. Make sure that the root of the .zip file contains the compiled DLLs and folders, for example:

    Folder structure and compiled DLLs.
  6. Copy the zipped Sitecore.Experience.Commerce.Engine.*.zip file to your deployment root.

Do you have some feedback for us?

If you have suggestions for improving this article,