Sean Holmesby

.NET and Sitecore Developer

By

Speed up TDS Code Generation time

TDS 4.0 introduced Code Generation as one of it’s features, and I’ve been using it on projects ever since. The fact that you have classes generated based on your Sitecore templates, means the time spent to hand roll these models is eliminated.

When setting up a TDS project with Code Generation, there are actually multiple ways this can be achieved. If you’re using Glass Mapper, you can follow the setup here. If you’re using Fortis, you can follow the setup here. Or if you are doing anything else, TDS allows for that flexibility as well.

One thing I do differently from most of these instructional posts is I set the Base Project Transform File in a different way.

When setting up Code Gen on a project, most people set the Base Project Transform File setting on the project properties page.

01-project-properties-page
This setting means that all of your items are subject to the processing of the .tt file.
Now, typically in that file, for instance in GlassItem.tt, there is a check to see if the item is a template, and if not, skip over it…..which is what’s required in most cases because you might typically only generate code for templates.
However there is still the little overhead of running the TT file on the item, and doing the check.

What I do instead is I keep the Base Transform File setting blank, and instead navigate to the root folder of the items I want to generate code for.
In the case of the LaunchSitecoreTDS project, this is the /sitecore/templates/Launch Sitecore item.
Then I open the properties on that item, and set the Code Generation Template to the TT file.

02-item-properties

Note: I also typically set the Namespace property here as well, also leaving it blank on the project properties page.

What this means that code generation processing is ONLY run on items below this folder, and not on all other items in my TDS project. This is perfect in the case where I’m only generating code based off my templates, and nothing else. No time is wasted on the content, layouts, media library or system items.
Using this setup, I manage to save a little overhead processing time when performing Code Generation, meaning I can get back to my code a little quicker.

 

By

TDS Post Deploy Step – Rebuild Content Search Indexes Script

This post shows how I created a custom TDS Post Deploy Step to rebuild the Content Search Indexes after my deployment in the Launch Sitecore TDS solution.

Hedgehog are currently asking for community contributions to the Post Deploy Step repository, so we can all benefit from each other’s work.

Got an idea for a Post Deploy Step? Let us know.
Getting started is super easy.

My Custom Post Deploy Step:
Rebuild Content Search Indexes

Problem: As a developer, you may have added new fields to a Sitecore data template, or extended Sitecore with a custom index field. TDS makes it easy to get your changes deployed to other environments, however, you can’t begin querying these fields until a full index rebuild is performed. Deploying new code without an index rebuild can result in search listings coming up empty, or worse, broken pages.
Read More

By

Allow for Long-Running TDS Post Deploy Steps

This post describes how to increase the TDS deployment timeout setting so long-running Post Deploy Steps can complete their execution.

Team Development for Sitecore has many points of extension. You can implement custom code generation, custom MSBuild steps, and even custom project validators. These extensibility points make TDS capable of doing just about anything you want it to do in your build process.
To make things even easier, TDS 5.5 introduced Post Deploy Steps, and, as with many other TDS features, you can extend the Post Deploy Steps to run your own custom code.
Hedgehog are currently looking for developers to think up some custom Post Deploy Steps so they can be shared with the rest of the community.

Creating a Post Deploy Step is easy. Charlie Turano shows how a basic step can be created on the Hedgehog blog.
Read More

By

TDS AutoSync – one way is not the only way

This blog post was inspired by a comment on the TDS v5.5 Feature Spotlight Video for AutoSync.
The question was this:-

“Does it sync the other way around also? When you retrieve items from your source control and need to push them to Sitecore?”

The simple answer to that is no. AutoSync in it’s purest form only works one way. It will read changes from Sitecore into your TDS project, but will not take .item file modifications and auto update Sitecore with the changes.

We can make it happen though….. but first, the question has deeper connotations that I want to discuss.
Read More

By

TDS: The Evolution of Auto-Sync

Team Development for Sitecore (TDS) version 5.5 has now been officially released to the public I’ve had a play with the impressive list of new additions, and loved the further improvements to my Sitecore development efficiency. Features like the new Delta Deploy feature, and the Auto Deployment of Content Files have me doing Sitecore development quicker than ever.

One big new addition available in TDS v5.5 is the AutoSync feature… Another efficiency helper, where Sitecore changes get synced back to the TDS project automatically.
It has been described as a ‘new’ feature…. But is it?

Really, Auto-Sync has existed in TDS for a while, it’s just taken on a new form in v5.5.
Let me explain what I mean by this.

Read More

By

Fixing Visual Studio IntelliSense in Sitecore MVC Views

IntelliSense in Visual Studio is a fantastic auto-complete feature that greatly improves your Sitecore development, however I’ve occasionally seen this not working in my MVC solutions.

01 - HTML Sitecore Helper not working

In particular, I was seeing the following error highlighted around any calls to the @Html.Sitecore() helper:-

‘System.Web.Mvc.HtmlHelper<Model>’ does not contain a definition for ‘Sitecore’ and no extension method ‘Sitecore’ accepting first argument of type ‘System.Web.Mvc.HtmlHelper<Model> could be found.’

This would mean that I could not get auto-complete on the @Html.Sitecore() helper, nor would I get auto-complete for my properties on my Glass Models.

Read More

By

The Launch Sitecore Site using TDS

The Launch Sitecore site is a great shared source site that allows Sitecore editors and developers to check out a complete Page Editor and DMS friendly Sitecore solution. The site comes complete with Engagement Plans, User Profiles and Lucene Indexing, and the code and content can be downloaded by registering on the site, then going to the /download page.
Launch Sitecore

While playing around with the site, I wanted to have a play with a couple of things from the development side of things. I wanted to teach myself things with:-

As a result, I have created a GitHub repository that has the code from the Sitecore package in a Web Application solution, and have converted all of the items in the package into serialised items in TDS.
You can grab the repo from here:-
https://github.com/SaintSkeeta/LaunchSitecoreTDS

Read More

By

Sitecore Development Tools

Last week I was honored to be a part of the Sitecore Development Tools Round Table discussion at the 2013 Sitecore Users Virtual Summit. Talking with a team of seasoned Sitecore developers, we discussed the tools and add-ons that we each use during our everyday Sitecore development.

Read More

By

TDS 4.0 – Things you may have Missed

I originally published this post on the Igloo blog.

This blog post is about Hedgehog Development‘s Team Development for Sitecore, and the features in the soon-to-be-released version, TDS 4.0.

While talk around 4.0 has mainly been about the big features like Code Generation, Config Transforms and the Item Merge tool, I thought it’d be good to talk about the small features and improvements that people with access to the Beta may have missed.

The video below goes through little changes like the ability to open an item’s folder in Windows Explorer and the option to Show excluded files from the project. We also mention the updates to the ‘Sync with Sitecore’ window, and the new option to sync with just a single item.

We also go into detail about how you would use the Item Merge tool in a real world scenario, and how TDS 4.0 automatically organises the structure of the project file, meaning less merge conflicts. Yay!

Enjoy.

http://www.youtube.com/watch?v=NQNFQBCK0fA

By

Sitecore TDS 4.0 – Item Merging

I originally published this post on the Igloo blog.

merge1

This blog post is about Team Development for Sitecore by Hedgehog Development, and the new item merging feature in TDS 4.0.

In a webinar on TDS by the Sitecore Virtual User Group, Dan Galvez, a founder of Hedgehog Development, mentioned that TDS 4.0 would include a new tool for merging Sitecore items. This would act in the same way that you’d merge .NET code.

In the past, when you sync with Sitecore you would have to choose to push the entire item either to Sitecore, or to the TDS project. The item merge tool adds more granularity, allowing you to update Sitecore for some fields, and update the TDS project for others.

Read More