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:
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.
Can we have only specific items in a TDS Package rather than having all the synced items?
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:
And these are the Update Package Settings we do in our TDS Project:
Now, lets create some items in our Sitecore Solution.
Lets sync these items with our TDS Project.
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.
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.
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.
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.
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.
Hope you enjoyed the post!
Happy Sitecoring! 🙂