I recently was able to start using one of the new Linux (.NET5.0/CMS12) DXP instances to do some testing/development in, and I came across an interesting error that threw me for a loop.
I, for one, am not very versed in .NET Core, so this is all very new to me, so needless to say, when I FINALLY get to the point of being able to deploy code into DXP, have it successfully upload, and then ultimately fail to publish, it was very frustrating.
The error code and message I got was:
::ERROR:: ErrorId=DXCS006;Description=The code package does not contain the right assemblies or versions needed for DXP.
In this post, we will go through the following:
Setting the scene – How we got here
Well, first off…I do want to say that Optimizely has put a nice detailed “warning” message above the job output that tells you what package is missing, but I’m totally going to drag this out just a smidgen longer than that. (TL;DR in the How To Fix section)
To set the scene of how we got here, I started with setting up a project with the help of Mr Jon Jones, on his blog here: https://www.jondjones.com/learn-optimizely/cms/how-to-install-optimizely-cms-12-and-configure-a-development-environment/
Once at this point, I did a “dotnet publish” to a specific location. (I will go into specifics of HOW to do this in a later blog post)
Finally, I packaged it all up into the ‘.nupkg’ format, and sent it up to the DXP location using my Deployment Scripts
(Shameless plug: Deployment API Series – Post 1, Post 2, Post 3 | Github repo)
What is this error, and how did we fix it?
Everything was going great, until it suddenly wasn’t! I had a big ol’ error staring me in my face…
Naturally, my first inclination was to start Googling….which at the time of writing this, has zero information on it.
So again, next steps would be to just add every NuGet package in the books (with some relation to the cloud, DXP, or hosting), with no luck.
Ultimately of course, its always 10 seconds after I call in the reinforcements (Thanks Mark Hall) that I find the missing package:
EPiServer.CloudPlatform.Cms
The CloudPlatform packages are as follows:
- EPiServer.CloudPlatform.Cms (Only for CMS)
- EPiServer.CloudPlatform.Commerce (Only for Commerce)
This package is specifically needed for publishing into DXP and will help with the setup of the Connection Strings, Application Insights, Warmup, Blobs, Events, etc…
Conclusion/TL:DR
Mark Hall also sent me a great link to getting a project into the DXP platform: https://world.optimizely.com/documentation/developer-guides/digital-experience-platform/deploying/creating-a-new-cms-site-and-deploying/
As I dig more into CMS 12, my main goal is to update my deployment scripts with any necessary updates, but also make sure to document any issues I come across with any of these deployment scenarios.
More to come!
As always, please reach out if you have any questions/comments/concerns.