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

Akshay Sura - Partner

14 Apr 2020

Share on social media

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 Sitecore.Commerce.WDP.2020.01-5.0.145.zip from the dev.sitecore.net 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 

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. https://twitter.com/akshaysura13 on Twitter or on Slack.

Sign up to our newsletter


Tags:

Sitecore Commerce

Share on social media

Akshay Sura

Akshay is an eight-time Sitecore MVP who has spent more than a decade working exclusively on Sitecore projects.

In addition to his work as a solution architect, Akshay is also one of the founders of SUGCON North America 2015, SUGCON India 2018 & 2019, Unofficial Sitecore Training, and the Sitecore Slack.

Akshay founded and continues to run the Sitecore Hackathon. As one of the managing partners of Konabos Consulting, Akshay will continue to work with clients to lead projects and mentor their existing teams.


Subscribe to newsletter