Sitecore Assembly List NuGet Packages

Abstract

This topic describes the version-specific packages in the sc-packages NuGet feed.

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.

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.

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

nuget list Sitecore.Assemblies -Source https://sitecore.myget.org/F/sc-packages/api/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:

<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. Fort 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:

<?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.