Visual Studio Solution setup for Sitecore Commerce Engine 9.3 using Sitecore.Commerce.Engine.SDK.5.0.76

Visual Studio Solution setup for Sitecore Commerce Engine 9.3 using Sitecore.Commerce.Engine.SDK.5.0.76

In this blog post we are going to setup a base Visual Studio solution for working with Sitecore Commerce 9.3 using the Sitecore Commerce Engine SDK version 5.0.76.

As part of your commerce install you would have downloaded from the site. The commerce SDK (Sitecore.Commerce.Engine.SDK.5.0.76) is part of this file.

Extract the Sitecore.Commerce.Engine.SDK.5.0.76 and open the Customer.Sample.Solution.sln.

Build the Customer.Sample.Solution.sln solution so all the NuGet packages are downloaded and you get a successful build.

Install the following NuGet packages in your Sitecore.Commerce.Engine project:

  • Serilog.Sinks.PeriodicBatching 2.2

  • Serilog.Sinks.Udp 6.0.0

  • Sitecore.Commerce.Plugin.Coupons 5.0.20

  • Sitecore.Commerce.Plugin.Tax 5.0.20


Remove the Plugin.Sample.AdventureWorks and Plugin.Sample.Habitat projects from your solution.

I usually leave the braintree for testing purposes and I can remove it in the future after I am done using it as a reference.

Remove the following files from the Sitecore.Commerce.Engine\wwwroot\data\Environments”

  • PlugIn.AdventureWorks.CommerceAuthoring-1.0.0.json

  • PlugIn.AdventureWorks.CommerceMinions-1.0.0.json

  • PlugIn.AdventureWorks.CommerceShops-1.0.0.json

  • PlugIn.Habitat.CommerceAuthoring-1.0.0.json

  • PlugIn.Habitat.CommerceMinions-1.0.0.json

  • PlugIn.Habitat.CommerceShops-1.0.0.json 

Remove json files

At this point you are pretty much set, rename the solution and check it in to your repo.

The next steps would be to copy over files from your running commerce instance into your Sitecore.Commerce.Engine project.

Copy the following files:

  • C:\inetpub\wwwroot\CommerceAuthoring\wwwroot\config.json to your solution C:\code\Sitecore.Commerce.Engine.SDK.5.0.76\src\Sitecore.Commerce.Engine\wwwroot

  • C:\inetpub\wwwroot\CommerceAuthoring\wwwroot\bootstrap\global.json to C:\code\Sitecore.Commerce.Engine.SDK.5.0.76\src\Sitecore.Commerce.Engine\wwwroot\bootstrap

  • C:\inetpub\wwwroot\CommerceAuthoring\wwwroot\data\Environments\*.json to C:\code\Sitecore.Commerce.Engine.SDK.5.0.76\src\Sitecore.Commerce.Engine\wwwroot\data\Environments

If you have any questions or concerns, please get in touch with me. on Twitter or on Slack.