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

Sitecore to acquire Hedgehog
Hedgehog is thrilled to announce we have entered into a definitive agreement to be acquired by Sitecore.
SUGCON Europe 2019: A Hedgehog Live Chat
Hedgehog is headed for London! Our SUGCON Europe team talks sessions, SUGCON memories and shares tips for getting the most out of the conference.&nbsp;<span style="white-space: pre;"> </span>
Hedgehog Announces the Release of TDS Classic 5.8
Hedgehog announced the release of TDS Classic 5.8. The newest update now supports Azure and Visual Studio 2019.
Sitecore, Docker, SUGCON - Oh My!
Sitecore MVP Sean Holmesby took the time to talk with us about his presentation and SUGCON.
Enhanced Content Editing for Sitecore: An Avtor Live Chat
In our first product-centered live chat, the team covers Avtor, the essential Sitecore content editing tool.
Hedgehog Announces Release of Avtor
Hedgehog, a digital consultancy engineering high - performance, multi-channel solutions, today announced the release of a brand-new product called Avtor, a part of the Team Development for Sitecore Essential Collection.
How Feydra Improves Front-End Development for Sitecore
Feydra offers a more efficient modern approach to front-end development workflow for Sitecore.
Guide to Sitecore Packaging
Development of features and components requires a set of Sitecore items to be packaged - things like renderings and templates. With TDS Classic, Sitecore developers can automate the packaging process.&nbsp;
TDS Classic: Content File Sync
Content File Sync is a fantastic time saver for any Sitecore developer.
Sitecore Security and Strengthening Your Sitecore Platform
Improve the security of your Sitecore platform with these tips
Sitecore Experience Accelerator: Missing Video Description
<p>A fix for the missing Video Description field in SXA 1.4</p>
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.
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.
FxCop Rules for Sitecore Helix
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.
3 Critical (and Common) Sitecore Wellness Issues
There are a lot of factors that can adversely affect Sitecore and its performance. There a few common errors that we almost always uncover when running a wellness evaluation.
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>
Sitecore Placeholder Fallback
When implementing Sitecore websites, we sometimes run into a situation where the Content Editor wants to personalize or A/B test components that are common to multiple pages in the site. A good example of this is the header and/or navigation components. The problem we run into is that the components need to behave the same on all pages and it would be very difficult, if not impossible for content editors to maintain these components on all pages on the site. I have seen a few ways of solving this problem, but most solutions had some drawbacks that limited the capabilities of the content editor.
Customizing WFFM in Sitecore 8
WFFM is a great tool for allowing content editors to build custom forms. The main issue with WFFM is that it doesn't always generate the HTML we need for the site. This blog post shows how to customize the HTML in different ways for each sub-site.
Robust MVC Rendering Exception Handler
While working on a recent Sitecore MVC implementation, I started to think about how Sitecore handles errors in the MVC components on a page. In past implementations, I had added a processor to the mvc.exception pipeline to route the user to the error page for the current site. This works reasonably well, but I began to notice a few drawbacks.
Context Based Datasource
Creating and maintaining your datasources in your content tree can be challenging. This blog post shows how to get Sitecore to help organize the datasources.
Predefined Roles and Creating Your Own
What are the out of the box Sitecore roles, when should you make your own, and how do you do it?
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.