Sitecore Assembly List NuGet Packages

Current version: 10.1

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. TDS supports using these packages to validate references against the version of Sitecore you target. You can also use custom MSBuild logic to exclude Sitecore-provided assemblies from publishing, In both cases, this prevents you from accidentally overwriting these assemblies and breaking your Sitecore instance. When you use these packages to exclude built-in assemblies from deployment, you also reduce the size of your deployment artifacts, which potentially speeds up local builds.

Note

The Sitecore NuGet packages are intended for use at build-time only. NuGet packages are not meant for use in a runtime environment. Ensure that your runtime environment only contains the assemblies that are required for your solution.

Available packages

Assembly packages are currently available for the roles and deployment targets mentioned in the following table:

Name

Versions

Description

Sitecore.Assemblies.Platform

9.0+

All roles based on the the main Sitecore platform (CM, CD, Reporting, and so on).

Sitecore.Assemblies.XConnect.Web

9.0+

The primary XConnect (Collection) role.

Sitecore.Assemblies.XConnect.IndexWorker

9.0+

The XConnect search indexer role.

Sitecore.Assemblies.XConnect.MarketingAutomationEngine

9.0+

The XConnect Marketing Automation Engine processing role.

Sitecore.Assemblies.XConnect.ProcessingEngine

9.1+

The Sitecore Cortex™ data processing role.

Sitecore.Assemblies.SitecoreHeadlessServicesServer

17.0.0+

The Sitecore Headless Services.

Sitecore.Assemblies.SitecoreExperienceAccelerator

10.0.1+

The Sitecore Experience Accelerator role.

Use this NuGet command to retrieve a list of all Sitecore.Assemblies.* packages available:

RequestResponse
nuget list Sitecore.Assemblies -Source https://nuget.sitecore.com/resources/v3/index.json -AllVersions

Package contents

All assembly list packages contain an MSBuild targets file that is automatically imported into a Visual Studio project when it is referenced. This targets file contains an ItemGroup called SitecoreAssemblies with the filename and metadata of every assembly shipped by Sitecore for the associated role:

RequestResponse
<SitecoreAssemblies Include="Sitecore.Kernel.dll">
    <Name>Sitecore.Kernel.dll</Name>
    <Version>13.0.0.0</Version>
    <FileVersion>13.0.0.0</FileVersion>
    <InfoVersion>13.0.0-r00729</InfoVersion>
    <Source>Platform</Source>
</SitecoreAssemblies>

Usage

If you use Sitecore TDS, follow the instructions in the TDS documentation to reference the assemblies package in the appropriate TDS project. For other third-party Sitecore build tools, read the documentation for that tool.

If you use an out-of-the-box MSBuild Publish configuration, place this in a .wpp.targets file in the project to exclude files from deployment:

RequestResponse
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <!-- Delay evaluating this item group to ensure nuget package has been evaluated. -->
  <Target Name="ExcludeSitecoreAssemblies" AfterTargets="Compile">
    <ItemGroup>
      <ExcludeFromPackageFiles Include="@(SitecoreAssemblies -> 'bin\%(Filename)%(Extension)')" />
      <ExcludeFromPackageFiles Include="@(SitecoreAssemblies -> 'bin\%(Filename).pdb')" />
      <ExcludeFromPackageFiles Include="@(SitecoreAssemblies -> 'bin\%(Filename).xml')" />
    </ItemGroup>
  </Target>
</Project>

If you need to override a value from the assembly list, add an Exclude attribute to the ExcludeFromPackageFiles elements.

Do you have some feedback for us?

If you have suggestions for improving this article,