Sean Holmesby

.NET and Sitecore Developer


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


TDS Post Deploy Step – Rebuild Link Database Script

This post shows how I created a custom TDS Post Deploy Step to rebuild the Link Database 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:

Problem: When links are made between Sitecore items (for example, through the use of internal links, and reference fields), Sitecore will store those relationships in the Links Database. The Links Database provides quick access to these bidirectional relationships between items, allowing Sitecore to quickly retrieve related items. It’s generally a good idea to rebuild the links database from time to time, especially when working with reference fields or developing features that rely upon it directly.
Read More


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


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


Real-Time Auto-Reload Logging with Sitecore’s Rolling File Appender

Just found this…you may already know about it, but if not, hopefully it helps you with Sitecore development.

Sometimes you want to tail the log files from Sitecore, and see what’s happening in real-time on your Sitecore site.
But then you do a build or make a config change, logging stops in that file and a new log file is created. You then need to open that new file in the tailing program.

I’ve seen SIM‘s DynamicLogViewer reload the file automatically…. and also Nick Hills’ version of logging using DebugView, but I like Baretail (it has highlighting for easy recognition).

Anyway, I just found you can easily change Sitecore to always log to the one file.

Read More


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


Safe Dependency Injection for MVC and WebApi within Sitecore

This post describes how we’ve considered approaching dependency injection with Sitecore at Hedgehog Development.
Many people have posted about dependency injection in Sitecore before, and each has had their own twist.

We’ve noticed that sometimes Sitecore controllers are failing to be resolved when there is a custom Dependency Resolver added.
The problem, as described in Mickey’s first post, is that MVC only allows for one DependencyResolver. So the moment you set your own Dependency Resolver, whatever was set there before (like whatever Sitecore set as the Dependency Resolver) will no longer work.
Because of this, Sitecore’s registered types will no longer get resolved, and you might see the following errors in the logs when you try to access one of the out-of-the-box Sitecore applications.

Exception: Sitecore.Mvc.Diagnostics.ControllerCreationException
Message: Could not create controller: 'Settings'.
The current route url is: 'api/sitecore/{controller}/{action}'. 
Source: Sitecore.Mvc
   at Sitecore.Mvc.Controllers.SitecoreControllerFactory.CreateController(RequestContext requestContext, String controllerName)

Message: No component for supporting the service Sitecore.Controllers.SettingsController was found

I spoke to Charlie Turano about this, and our solution was to create a ChainedMvcResolver, which will set a ‘Fallback Resolver’ to whatever the resolver was before we came along and set ours.
Read More


Parsing a Delimited CSV File in Coveo

I was trying to find a way to take a single CSV file containing addresses, and parse each address into it’s own document.
The file had an address on every line, and was delimited with a ‘|’.


After posting on the forums about getting this to work with the File Connector, I was told that the Database Connector was better suited for this.

To set this up there were a couple of moving pieces, so I thought I’d detail them in this blog post.
Read More


The Truth About Sitecore Upgrades

This blog post gives some insight from what I’ve learnt about the Sitecore Upgrade process, and my beliefs about how you should approach an upgrade. Many people have their own opinions on upgrades, and many have voiced them, either through user groups, blog posts, or forum replies.
While I agree with some, and disagree with others, we’re all still learning…. so nothing should be taken as gospel from anyone…
The posts (including this one) are opinions, mainly based off the author’s own experiences… and so, if there are things here that I’ve missed in this post, or something you disagree with, please let me know in the comments.

At one stage or another, every client will want to upgrade their Sitecore instance.
This may be for bug fixes, or for some of the new features that come with the latest versions of Sitecore. And with the plethora of new marketing features in Sitecore 8, the push to be up-to-date has never been greater.

At Hedgehog Development, we’ve worked on numerous Sitecore upgrades over the years.
Every one of them we’ve learned something new. No two upgrades have been the same, and some have been far more complicated than others. We’ve even written custom applications that allow an upgrade to take place over a couple of weeks, to allow for full testing and a slow, controlled roll-out of new features.
With this experience, we’ve learnt the steps involved in the upgrade, and the importance of all the intricate processes that occur during the upgrade.
Read More


Debugging a custom Coveo conversion script

This post details the way I figured out how to debug a Coveo Pre or Post Converter written in .NET.
This blog post comes off the back of a question I asked on the Coveo Answers website.
Disclaimer: I am just starting to learn the inner workings of Coveo, and I could not find any documentation on exactly how to do this. If anyone has any other way of debugging, please let me know in the comments, but hopefully this can help anyone who was running into the same issues that I did.

Firstly, I am running Coveo Enterprise Search 7. This may change in future versions of CES, so be aware that this is how I managed to get it to work at the time of writing this post.

Setting up the project

  • Set up a C# class library project in Visual Studio.
  • Change the Target Framework of the project to .NET Framework 3.5.
    • Right click on the project
    • Select Properties
    • On the Application tab, select .NET Framework 3.5 from the Target Framework drop down.
  • Add a class for your conversion script. An example of one is below.
    using System;
    using Coveo.CES.ConversionScriptLoader;
    using Coveo.CES.ConversionScriptLoader.Interops.x64;
    namespace SampleCustomConverter {
        public class MySamplePostConverter : CustomConverter {
            public override void RunPostConverter(IPostConversion p_PostConversion, IDocumentInfo p_DocumentInfo) {
                p_PostConversion.Trace("Hello from my .NET post converter: " + p_DocumentInfo.URI, SeverityEnumeration.SeverityNormal);
  • Build the project in a Debug configuration.

Setting up the conversion script

When you go to add a post conversion script you are required to enter the Script File path and the Type Name.

  • In the Script File field, enter the full path of the DLL produced by the project.
    • i.e C:\MyProjects\SampleCustomConverter\bin\Debug\SampleCustomConverter.dll
  • In the Type Name field, enter the fully qualified type name of your class.
    • In [namespace].[class name] format
    • i.e SampleCustomConverter.MySamplePostConverter
  • Save the conversion script and apply it as you normally would.

Attaching the debugger

Back in Visual Studio, attach the debugger to the CESConverter7.exe process.

  • Select Debug -> Attach to Process
  • Change to ‘Managed (v3.5, v3.0, v2.0) code’
    • In the ‘Attach To:’ field, click ‘Select’
    • Select ‘Debug these code types’
    • Ensure you have ‘Managed (v3.5, v3.0, v2.0) code’ checked
  • Select the CESConverter7.exe process.
    • If the process doesn’t show up, you may have to start and stop a rebuild of the indexes in the CES Admin Tool.
  • Click ‘Attach’

Rebuild the source in the CES Admin Tool where you’ve setup your conversion script.
You should now see your breakpoints load, and get hit during the indexing of content.

For information about Pre or Post Conversion scripts, see the following:-