Skip to main content

Posts

Showing posts from April, 2024

How to exclude Sitecore provided assemblies from MSDeploy build outputs?

If you are working on a Sitecore solution, you will end up referring Sitecore assemblies in your solution. When you deploy your solution to a higher environment or publish it to local Sitecore instance, the Sitecore assemblies referred in solution also gets deployed/published. This creates following problems -  chances of accidentally overwriting out of box Sitecore assemblies and breaking your Sitecore instance increased size of your deployment artifacts So how do you exclude Sitecore-provided assemblies when you build solutions?? The sc-packages NuGet feed includes version-specific packages that you can use to easily validate or exclude Sitecore-provided assemblies when you build solutions. You can use the below command to check these assemblies -  nuget list Sitecore.Assemblies -Source https://nuget.sitecore.com/resources/v3/index.json -AllVersions How does it work? You can use custom MSBuild logic to exclude Sitecore-provided assemblies from publishing. All you have to do is to ins