Try our conversational search powered by Generative AI!

Deployment API - Commerce (build package issue)


Has anyone successfully deployed commerce websites using the deployment API?

I am having an issue, trying to build the commerce manager package using the steps outlined in Anders post here:

I am using the YML pipeline he describles here:

The issue I am experiencing is that it uses WebPublishMethod="Filesystem" which is causing an issue (i think). It first builds the CMS website (as files - not as a package) and overwrites the Commerce Manager on top of it (because it's the same location specified in the 'publishurl'). This is not an issue with the tradtional deployment because it creates two separate packages/artificats in the drop folder. 

Would love ot know if someone else has experienced this issue and a way to fix it?

Apr 08, 2021 15:31

Hi Aniket,

The article you reference describes creating a single package. In the YAML you posted, you need to create two nuget packages. One for cms and one for commerce manager. This basically means you need run the VS Build once for cms, then create nupkg. Then a VS build for commerce resulting in another nupkg.

Once you have those its just a case of building two release pipelines targetting the two separate nupkgs. This allow also allow you to deploy separately.

I would also recommend taking a look at direct deploy. This reduced our deployment time from 40 minutes to 8 minutes! same article by Anders.

Apr 08, 2021 16:41

Hi Surjit,

Thanks for the response. Unfortunately, when creating a package for the CMS it automatically builds and adds the commerce manager on top of it. Also, I don't know a way to build commerce manager package separately (VS build requires a solution file to be selected not a .csproj file). 

I believe the root cause, is related to the .targets file in the Commerce Manager nuget package > build folder that tells the build which files to include using the <import Project> tag in the csproj file. This works fine with the traditional build and package (create artifacts for both cms and commerce in the drop folder which can be selected for the release pipelines) but not when using FileSystem as the publish method where raw files are generated in the location specified by the publishurl.


Apr 08, 2021 16:59

You can specify vsbuild to select a csproj.

- task: vsbuild


solution: '**/Web/Episerver.Web.csproj'

Set the publishUrl to be inside a temp directory you can also access from the release pipeline.

Apr 08, 2021 18:18

Thanks Surjit! That worked. The build was failing for a different reason when selecting the *.csproj file. I rectified the issue and that resolved it.  

Apr 10, 2021 5:54
Surjit Bharath - Apr 10, 2021 6:48
No problem!
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.