Blog

Using NuGet Packages in TDS

May 03, 2016 | Charlie Turano

A new feature we added to TDS 5.5 is the ability to create and consume NuGet packages in your TDS project. This allows developers to capture their Sitecore items and easily distribute them across multiple teams.

One of the ways we use this at Hedgehog Development is to distribute common base templates that are part of an implementation involving multiple sub-sites. The base templates are kept in a NuGet package and distributed via a private NuGet server. A TDS project incorporates the NuGet package to serve as referenced project for code generation. The TDS project with the items in the NuGet package should not be deployed, since they are not part of the sub-site.

Creating the NuGet package is pretty simple. I will describe the steps below:

1)     Add the NuGet Command Line package to your solution. The reason for this is that TDS needs the NuGet tools to build the NuGet package. The NuGet Command Line package needs to be added to a non-TDS project in your solution.
2)    Enable NuGet package generation in TDS. This is done in the NuGet Package property page by checking the “Generate NuGet Package” checkbox.
3)    Provide the path to the NuGet.exe command that was added to the project is step 1 in the “Path to NuGet.exe” text box. This should be a relative path if you are using Automated Builds.
4)    Fill in all required fields in the NuGet Package property page. You may also fill in any optional fields needed for your project. The definitions of these fields can be found in the NuGet documentation.
5)    Build the TDS project.
6)    Distribute the package.

Using a TDS NuGet package is also very simple.

1)    Right click on the TDS project in the solution explorer and choose “Manage NuGet Packages…”
2)    Select the NuGet package in the NuGet package manager
3)    Click “Install” in the NuGet package manager.

Using NuGet packages to distribute your items to multiple project has a number of advantages. These include the ability to easily update the package and creating dependencies between packages. For more on this feature, check out our Feature Spotlight video.

Sitecore

Related Blog Posts

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.
TDS How To: Install the TDS Connector for Rocks 2.0
Manually install the TDS connector for Sitecore Rocks 2.0
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.