How to create Continuous Integration with TFS, TDS and Visual Studio for a Sitecore Helix Solution

(**Note: This might be little pre mature, but I want to capture the main process of the solution before I forget.)

I have created a Sitecore project using Helix Principle. For all the TDS projects I have created a Global TDS config and that is the easiest way to handle the TDS items. We are using a local VM that doesn’t have no internet access. But our host machine has internet access. We map our VM drive to a drive letter on the host machine. For example “x” drive might be pointing to VM’s c:\inetpub\mysite\Website. This works great while doing the local development and keeps our security people happy.

Now with the Helix, we want to implement our CI, everytime a developer check in code to the main branch. Our build server doesn’t have any network connectivity, so All the nuget packages has to be supplied through source control. That’s fine. But problem is, I am pointing my local TDSGlobal.config to <SitecoreWebUrl>[VM website address like]</SitecoreWebUrl>  and <SitecoreDeployFolder>[Network path like \\\mysite\website]</SitecoreDeployFolder>. These paths are obviously invalid for the build server and it keeps on trying to copy files to a non existing location.  Build breaks!

My issues

a. TDSConfig path

b. I have a xxx….afterbuild file that was also breaking for same reason

c. HedgeHog sitecore target files are not found . So TDS complaining about Build Target.(this solves the problem “Error MSB4057: The target “Build” does not exist in the project”.



  1. Fix the TDSConfig path
    1. There should be 2 propertyGroup on TDSGlobal config.
      1. Debug Condition
        1. All the specific items should go here
      2. Release
        1. Should have nothing at this point (for me, your situation might be different)
  2. Remove the solution afterbuild and common.props (for now, I will update this soon)
  3. go to your C:\Program Files (x86)\MSBuild\HedgehogDevelopment\SitecoreProject\v9.0 and grab all the files and create a new folder at solution level called (whatever you want) Hedgehog and put all the files in that folder.
    1. Open the HedgehogDevelopment.Sitecore.Project.Targets and Search for HedgeHogDevelopment.SitecoreProject.Tasks.dll and and remove “$(MsBuildThisFileDirectory)” segment and leave everything else.
    2. Search for TDSService.asmx and change to <Copy SourceFiles=”TDSService.asmx” Destination files=[keep this as it is ] /> This will be actually take out some of the “$(MsBuildThisFileDirectory)” segment .
  4. Search for for all *.scproj files from your root folder. (You can do this part using unload project and editing file).
    1. At the bottom you will find a import statement for the hedgehog delete it and replace it with
    2. <Import Project=”..\..\..\..\Hedgehog\HedgehogDevelopment.Sitecore.targets” />
    3. Save all.
  5. Change the project to release and check in.
  6. If your CI is not setup to automatically watch the main branch, manually queue a build.
  7. Watch it turn green 🙂


This was a very quick blog, so I don’t forget what the issue was and how I solved it. I will come back and update this soon.


I have to give my shout out to the following blogs for giving me the helping hand. Thank you.