So today I was messaged by a developer that’s on one of my projects and he was having struggles with TDS and not being able to Sync with Sitecore. Anyone that has ever worked with Sitecore and TDS has probably experienced issues when they’ve gone to Sync with Sitecore. In this article I’m going to try to describe some of the issues I’ve faced and how to diagnose and fix those issues.
When configuring TDS for the first time, there are several different types of ways to configure TDS in your projects that you should keep in mind. Even if you aren’t tasked with setting up these initial configurations for a team project, it’s probably a good idea that you are aware of the different configurations that make up TDS. If you are using a solution that will contain multiple TDS projects (which is generally the case, at the bare minimum to track your master and core differences) than you will need to create a global TDS config. You can do this, by first at least adding one TDS project to your solution. Once you have a TDS project added, you can right click the solution, and select “Add Global TDS Config File”. By doing this, it will create a new solution folder called “.tds” and inside it will contain TdsGlobal.config. This file is important and should contain common configuration between your TDS project. I actually believe it’s important to use this file, even if you only have one TDS project because it helps block some of the properties for TDS that I commonly see developers changing without updating the .user config files, which I’ll explain that in a few minutes.
So another concept to keep in mind while using TDS, is that you can configure different configurations based on the different environments that you work with. So typically when developers are working with the solution, they will work in their local environments. So you would setup a local configuration, which would contain information specific to local development on a developers machine. Typically this would contain local connection information and deployment settings. You can then define in the Global TDS config file, specific settings for that specific local configuration. You could do this for all the different configurations that you have setup for your solution.
The last type of configuration is the user configuration. So lets say as I’m setting up the project solution for a team of developers, I setup the local configuration to point to the url http://site.local but your environment locally has a different url to represent the site on your local machine. Instead of updating the configuration so that when you go to commit changes, you will cause everyone else’s environments to change, you would instead just update your local environment, by changing this local config. This local config file will not be checked into source control by default. This is an important distinction to keep in mind. Also something I hinted to when I was talking about the global configuration file, if you set values within this file, for example for the url. It will actually make you pick the option “Update your local config file” before you can change a value. That is a great safe guard to protect developers from overwriting and checking in changes that might harm the progress of development.
Issues with TDS Sync
Scenario 1: Not having the correct Configuration Selected when doing a Sync with Sitecore
So like I mentioned previously, commonly in a solution, you could have multiple configurations for the project to represent the different stages of the life cycle deployment for the project. Typically I set everything up to use the “Local” configuration during local development. But quite often I get complaints that someone can not sync with Sitecore and after investigating the issue, it’s that they’ve not selected the correct configuration. To select a Configuration, use the image to the left for guidance. It may be a little confusing because there is really two places you can change the configuration. There is the place where when you are editing the properties of a TDS project, you can select a different configuration to modify that configuration’s settings. But understand that this just allows you to modify different configurations settings, and doesn’t actually change that configuration in the Visual Studio shell when interacting and instructing the projects to for example “Sync with Sitecore”.
Scenario 2: Using an Older Version of TDS when someone on your project has used a newer Version of TDS
This scenario happened to me the other day. You will know if this is the problem, if you check the history in source control. If someone has recently updated the Hedgehog dll in the Website/bin folder for the site, than it’s likely he did so, because he was using a newer version of TDS. You can try to get it to install the right Sitecore Connector, but in my instance it wouldn’t, probably because my dll was newer than the one I was trying to have installed. Try finding an existing copy of the dll and replacing the dll with that one. Also you might want to try reversing what is inside the _Dev folder as well (that’s located inside the Website folder) to an older version.
That’s the only scenario’s I have at the moment, but as I continue to work, I will continue to log different scenarios. If anyone else would like to contribute their own scenarios, please go ahead.