Thursday, May 29, 2025
This week we released an update to the ASP.NET Core SDK to support MetaData editing mode in XM Cloud.
This is a huge productivity increase for developers looking to leverage the SDK when building against XMC Cloud as it means that while we still don’t have support for Sitecore hosted Editing Hosts, it is now really simple to test your local development changes in XM Cloud before committing your changes.
You can now, when logged into the XM Cloud Pages app, use the editing host selector to change over and connect directly to a locally running instance of your head like you can see below.
This is a great boost for developer productivity as it allows you to test how your changes will look directly in the SaaS editing interface, without actually having to deploy your changes. This means you can iterate on changes, only committing them into your repo when you’re truly happy that they’re ready to be deployed.
These changes have already been integrated into the XM Cloud DotNet Starter, so anybody starting a new project based on that starter kit will get this functionality by default. If you started a project using the SDK beforehand though, it’s easy to add the functionality in to your project in just a few steps.
Sitecore.AspNetCore.SDK.Pages Assembly
.@addTagHelper *, Sitecore.AspNetCore.SDK.Pages
<sc-editingscripts></sc-editingscripts>
in your head section. AddSitecorePagesHandler()
, WithSitecorePages(sitecoreSettings.EdgeContextId ?? string.Empty, options => { options.EditingSecret = sitecoreSettings.EditingSecret; });
and UseSitecorePages(pagesSettings);
in your program setup.You can see a detailed description of how these changes were made by taking a look at the merged PR in the XM Cloud Starter DotNet repo.
This is another big step forward towards v1 of the SDK, which is when we have the majority of the XM Cloud features supported. If your interested in the current state of the SDK and what features we’re going to be building out next, then you can see our project in our public GitHub project.