1. Administration

Compile the Commerce Engine

Version:

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.

Note

The Commerce Engine supports Microsoft.OData.Core 6.19.0 (which references Microsoft.OData.Edm 6.19.0). If you create your own project in Visual Studio, and add a reference to Sitecore.Commerce.Plugin.Management package from the NuGet feed, Sitecore recommends that you add the following code to your project to suppress NuGet Warning NU1605, to avoid overring the supported version of Microsoft.OData.Core 6.19.0:

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">    <NoWarn>NU1605</NoWarn></PropertyGroup>

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-0 <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:

  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:

  6. Copy the zipped Sitecore.Experience.Commerce.Engine.*.zip file to your deployment root.

If you have suggestions for improving this article, let us know!