Create TDS Package with only specific Sitecore Items

Dear Sitecore Family,

How are you all doing? Sincere Apologies for being away from the blog for quite sometime. I was busy with a number of things along with working on a few of my personal projects on Raspberry PI.

Well, the only thing that I can say right now is:

terminator-back

Lets talk a little bit about today’s post. A couple of days back, I had a discussion with a few Sitecore developers regarding a challenge that they were facing. They wanted to create a package using TDS, but only for some items, say for the ones which are created and committed in a given Sprint. So lets discuss it.

Challenge:

Can we have only specific items in a TDS Package rather than having all the synced items?

Solution:

I am sure you know that we can create a Sitecore Update Package using TDS. For those who don’t here’s check this to know the configurations that we need to do for enabling it.

As we all know TDS is a great tool and after getting the ease of its use as well as the features that it provides, our gut feeling says there has to be some way of getting it done.

And the answer of the above, is YES! It can be done, using the “Exclude Item From” property and selecting the Visual Studio Solution configuration, from where we want to exclude it.

Lets see how can we do it.

These are the Build Settings that we do in our TDS Project:

TDS-Build-Settings

And these are the Update Package Settings we do in our TDS Project:

TDS-Update-Package-Settings

Now, lets create some items in our Sitecore Solution.

TDS-Items-in-Sitecore

Lets sync these items with our TDS Project.

TDS-Synced-Items

Now, when we build, based on the Solution Configuration that we have set in our Visual Studio, a directory is created in our project directory.

VS-Solution-Configuration

TDS-Project-Bin-Package-Folder

In here, is the update package created. To check its contents, we can rename it to .zip from .update and open it like any other zip file and check.

TDS-Package-Main-Templates-Project-FolderTDS-Inner-Items

Now, say this is Package 1 – which we have created and installed on all the required environments. In the next package, we don’t want these items to be packaged. Say we created new items only under the Base Item and dont want Page-Items item to be packaged. So here’s what we do.

TDS-New-Items-in-Sitecore

After the items are synced, Set the “Exclude Items From” property in the item/s which we don’t want to be included in the Sitecore Package.

TDS-Item-Properties

Now, when we build and check the Sitecore Package, we will be able to find, that the Page-Items Item will not be present in the Package.

TDS-Package-Page-Items-Not-in-Package

TDS-Package-New-Items-Added

Hope you enjoyed the post!

Happy Sitecoring! 🙂

Advertisements

2 thoughts on “Create TDS Package with only specific Sitecore Items

    • Thanks for that! Really helpful. I found this and didn’t find any direct supporting document anywhere, hence posted this. But thanks for your help with that article. 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s