Blog

Guide to Sitecore Packaging

March 29, 2018 | Sean Holmesby

Development of features and components requires a set of Sitecore items to be packaged - things like renderings and templates. Sitecore packages simplify the complex task of deploying changes to multiple environments in a consistent and repeatable way, lowering the cost of development and increasing reliability. With TDS Classic, Sitecore developers can automate the packaging process. 

Types of Sitecore packages

.zip packages - created through the Sitecore package designer. These can include both items and/or files and can be built in several different ways. More information on those can be found here.

.update packages - a different style/type of package. They too can include both items and/or files. These types of packages were created by Sitecore to handle product and module upgrades, and are usually installed via the /admin/UpdateInstallationWizard.aspx utility page.

TDS Classic is one of the few tools available that lets users generate .update packages in a straightforward fashion. This type of package is often used in SDLC processes to roll out new features into QA and Production environments.

Packaging 101

TDS Classic has an ‘Update Packages’ tab where developers can turn on package creation for a build.

This means that Sitecore-standard update packages will be created during build time, and developers can choose to use it to:
- contain both compiled code and items
- create separate packages, one for code and one for items
- create an items-only package.

These variations allow developers to customize their own deployments. If, for example, a deployment is setup for CD servers, and only the code is needed, this can be achieved. In that case the user would only need the code in the package (as items are published to the web database through Sitecore anyway).

Alternatively, if a user has another way to deploy the code to their CMS (like through MSDeploy, FTP, or xcopy), and they only need the update package to contain the Sitecore items, and not code, this can also be achieved with the items-only package option.

Switching on this function, and selecting these options, are all on the simple properties page.

Bundling multiple projects so you only have a single package to deal with

TDS Classic allows Sitecore developers to automate the packaging process. In the ‘Package Bundling’ section, users can select the other TDS Classic projects they want included in the Update Package they are generating and only need to manage one file for the entire solution’s build, instead of a package for each project. The projects that you want to bundle are selectable from the Multi-Project Properties page.

Excluding Items From A Package

If a user builds with different solution configurations (i.e. one configuration for QA, one for Staging, one for Production) they can exclude items from the package using either the Deployment Property Manager or by the Visual Studio Property Window

Select the items you don’t want to be include in the project, and in the ‘Exclude from Configuration’ box, check the configurations you don’t want them in. Then update packages won’t include them items in the deployment.

Delta Packages

Packages can be ‘shrunk’ down even further by telling TDS Classic in the build to ‘exclude items changed after’ a certain date. This is good for removing items known to have been previously pushed from the current package, shrinking down the package contents, and saving a lot of deployment time.

On the General tab, the ‘Exclude Items Changed After’ setting controls this (based off the __Updated field for items.) This is extensible, so users can even write their own logic about how items should be culled from the project. If using Git, the open source GitDeltaDeploy module can be used. This culls items based on a ‘git diff’ from your previous deployment.

Custom Post Deploy Steps

Also note that developers can run custom code at the end of a package install. This is done using the Post Deploy Steps, available on the ‘Deploy’ tab.

There are three out of the box, but you can use any of these community written ones or write your own.

Deploying the Packages

Another thing to note is that the package installation is up to the dev team. They can use whatever works for them to deploy the package.
They can use:
- Sitecore’s Built In Update Installation Wizard 
- Sitecore.Ship
- or our own open source Sitecore Package Deployer module 

TDS Classic’s Sitecore Package Deployer

When setting up Continuous Integration, it is possible to make the package installation easier by using our open-source Sitecore Package Deployer. The Sitecore Package Deployer installs packages automatically when they are pasted in a certain folder, and makes CI processes easier to implement.

The Sitecore Package Deployer uses a Sitecore Job to automatically deploy update packages that have been copied into a folder on the Sitecore server. This reduces the complexity of deployments because copying files to a web server is already something the deployment process does

TDS Classic’s Deployment Property Manager

The Deployment Property Manager allows users to deploy items to a Sitecore instance and allows them to further modify that deployment if they do not want the default behavior of every item in the TDS Classic project deploying every time.

Users can modify properties like:

Item Deployment, which determines how TDS Classic will handle the item at deployment.

Child Item Synchronization, which tells TDS Classic how to manage the children Sitecore items that are not in the TDS Classic project.

Exclude from Configuration, where selecting a checkbox next to the build configuration name excludes the selected item and all its children from that build configuration.

Start packaging with TDS Classic!

Sitecore TDS Classic Sean Holmesby

Related Blog Posts

TDS Classic as a Tool for Technical Audits
TDS Classic provides Project Report generation for Sitecore items, which can be very helpful with technical audits
TDS Classic: Content File Sync
Content File Sync is a fantastic time saver for any Sitecore developer.
TDS Classic How-To: Perform Unattended Installation of TDS Classic for Visual Studio 2017
The TDS Classic version for Visual Studio 2017 is installed a bit differently than previous versions; the process is separated in two parts and performed by two different installers.
TDS Classic 5.7 - Lightning Deploy
Lightning Deploy Mode can be used to enable Lightning Mode for all deployments that utilize the TDS Sitecore Connector in their configuration, improving their speed and efficiency.
TDS Classic 5.7 - Lightning Sync
Lightning Sync allows both sync and quick push operations to use TDS Classic 5.7's new Lightning Mode feature
TDS Classic 5.7 - Solution Wide Sync
A simple new feature in TDS Classic 5.7, Solution Wide Sync makes a big difference when working with many TDS Classic projects in a solution.
TDS Classic 5.7 - Lightning Mode
Lightning Mode helps to improve the speed and efficiency of both deploy and sync operations. This enhancement is achieved by modifying how item comparisons are performed.
Azure Sitecore Deployment: Deploying to a Slot
Setting up Azure staging slots, so the next release of our project can be placed there, allows us to deploy the new code to a private website (the slot), and test it before pushing it live. We are going to script this process to make it easier for the devops team to automate.
TDS Classic Best Practices: NuGet Build Components and TDS Classic .user configs
There are certain systems and processes that you can put in place to make a TDS Classic project run more smoothly. We're highlighting the best practices that our team recommends for getting the most out of TDS Classic.
Azure Sitecore Deployment: Adding Project's Code and Items to the Azure Deployment
Modify the scripts so that the compiled LaunchSitecore site is also provisioned into the new XP environment.
TDS Classic Best Practices: Bundle Packages, Delta Builds and Delta Packages
Following TDS Classic best practices, like using Delta Builds and Delta Packages, can make the entire development experience run much more smoothly.
Azure Sitecore Deployment: Adding Custom Modules
Modify the previous install so that the initial install contains the Sitecore Package Deployer module. It is an excellent way to enable continuous integration to the website.
TDS Classic Best Practices: Validators and the Sitecore Package Deployer
TDS Classic can be used in many ways, but the goal is always the same: make development (and developers lives) easier. Whether it's using the Sitecore Package Deployer or using validators, following best practices can make your entire experience run much more smoothly.
Azure Sitecore Deployment: Preparing the Default Scripts and Packages
Preparing the default packages for a Sitecore Azure deployment and extending to add a custom module to the install.<br> <br> <br> <br> <br>
Azure Sitecore Deployment: Setting Up the Solution and VSO Build
<p>The first in our series on setting up a Sitecore instance on Azure, with an initial deployment that includes custom built modules as add-ons to the setup.</p>
Troubleshoot and Prevent Failed TDS Classic Project Builds
When building an .update package with TDS Classic, the build might fail with no additional information. From increasing log verbosity to using validators, there are ways to minimize or prevent this type of error.
TDS Classic How-To: Disable Automatic Code Generation
Code Generation is automatically triggered after every change in the TDS Project tree. If a project contains many items, users can disable this feature for their convenience.
TDS Classic Sitecore Deploy Folder
Sitecore Deploy Folder is a setting, located in the build tab of the TDS Classic Project's Properties page, and used to tell TDS Classic where the webroot is located.<br>
TDS Classic Builds on Jenkins Build Server with NuGet Packages
Our simple scenario includes 2 developers using TDS Classic and checking-in changes to source control. The Jenkins build server takes the changes and performs the build, and then deploys the created package to two Sitecore environments.
Features to Improve Sitecore Development: TDS Classic Strikes Back
Each and every feature in TDS Classic is aimed at helping developers. Whether the feature is out front or running quietly in the background the goal is always the same: make the development experience better. &nbsp;&nbsp;
TDS Classic Features to Improve Sitecore Development
Each version of TDS Classic comes with the same goal: to make Sitecore development and, by extension, developers, lives easier. Every feature in our products is aimed at making the process better - some of these features aren't quite as well-known as others, but they all help smooth and improve the development experience.
Deployment Properties and the Deployment Property Manager
When working with TDS Classic, you will eventually need to deploy your items to a Sitecore instance and you might not want the default behavior of every item in your TDS project deploying every time. This is where the TDS Sitecore Deployment Property Manager comes in!
TDS Classic How-To: Use the HedgehogDevelopment.TDS NuGet Package
The HedgehogDevelopment.TDS NuGet Package allows you to build TDS projects, without the need of installed TDS on the build server machine.
TDS Classic 5.6 Feature Spotlight - Prevent Deployment of Incorrect Assemblies
This feature, new to TDS Classic 5.6, will prevent a solution from deploying unless all assemblies (except the excluded assemblies we allow you to specify) match what exists in your webroot.&nbsp;
TDS 5.6 Feature Spotlight - Project Item Report
This feature, new to TDS Classic 5.6, allows you to create a report of all items in the TDS Classic project.&nbsp;
TDS How To: Install the TDS Connector for Rocks 2.0
Manually install the TDS connector for Sitecore Rocks 2.0
Create TDS Classic Custom Post Deploy Step
Team Development for Sitecore Classic version 5.5 allows developers to add post deployment steps to to their deployments and update packages. TDS Classic has used post deployment steps internally to perform a number of useful functions. Many of the developers using TDS Classic have requested the ability to add their own post deploy functionality. With the release of TDS Classic 5.5 in early 2016, this functionality is now available.
Using NuGet Packages in TDS
New to TDS 5.5 is the ability to create and consume NuGet packages in your TDS project, allowing developers to capture their Sitecore items and easily distribute them across multiple teams.
Occasional Issue Seen with TDS Installer
When upgrading to TDS 5.5.0.x from an older version and trying to load a solution with a TDS project inside, the following error might occur:
TDS: The Evolution of Auto-Sync
Auto-Sync has been described as a new feature, but in reality has existed in TDS since 2010 and has taken a new form in TDS 5.5, due to be released March 22, 2016
TDS for SC Hackathon 2016
For all those participating in the Sitecore Hackathon, check out our Habitat for TDS and some other cool surprises.
Config Transforms for Config Files
If you don't want to use a third party development tool for your config transforms, I have good news. Config transforms are supported natively within TDS!
Package Installer from the Command Line
The TDS package installer allows you to install packages through the command line. Learn how...<br>
New Build for TDS 5.0!
A couple bugs were reported over the last few months. We've been able to fix the bugs and now have a stable CTP version for use.
It's finally here!
Team Development for Sitecore has finally been released go download it now!
Team Development for Sitecore Webinar
Our Sitecore MVPs Charlie and Sean recently did a demo of TDS to all Sitecore partners. We recorded the demo to share with the world.