This post has been migrated from, we apologise if some of the images or content is missing

Microsoft now supply the ability to have a Team Foundation Server in the cloud, this is called Visual Studio Online. Starting from version 5 of Team Development for Sitecore support has been added to allow you to build projects using Visual Studio Online. There are a few steps that you will need to go through to make this work. First I have created a simple solution that contains a web application and a TDS project:
I have added the project to source control as I would normally. With Visual Studio Online it isn't possible to run the TDS installer on the TFS build server, instead all the files we need must be part of our source control. Therefore the first thing we need to do is add the TDS build files to our solution, you can find these files in C:\Program Files (x86)\MSBuild\HedgehogDevelopment\SitecoreProject\v9.0. Copy them to a folder in the route of your solution, I have called mine TDSFiles.
You will also need the Sitecore files required by the TDS packager, I have copied these into the Sitecore folder:
Make sure that you add all these files to source control. When adding these files through TFS it will try to exclude the DLLs, make sure that all the files get added. We now need to configure our Release build in Visual Studio. Right click on the TDS Project and open the TDS Project Properties and switch to Release. In the Build tab ensure that nothing is configured, then click on the Update Package and configure the update package. In the Sitecore Assembly Path enter the relative path to the Sitecore assemblies you added to source control:
Now create a TDS build that builds the Release configuration. If you try to build the solution at the moment you will receive the following error:
To correct this we need to update the TDS project to point at the right location. In Visual Studio right click on the TDS Project and Unload Project. Right click on the project and edit it, you should now see the project XML. At the end of the XML there should be an import statement for the HedgehogDevelopment.SitecoreProject.targets file:
This needs to be updated to use the project file uploaded to source control. This path must be relative:
You can now reload this project. We also need to update the /TDSFiles/HedgehogDevelopment.SitecoreProject.targets file, open this file you should see lots of entries for $(MSBuildExtensionsPath)\HedgehogDevelopment\SitecoreProject\v9.0\HedgehogDevelopment.SitecoreProject.Tasks.dll:
This needs to be changed to a relative path, this path is relative from the TDS Project importing the file, so we need to replace $(MSBuildExtensionsPath)\HedgehogDevelopment\SitecoreProject\v9.0\HedgehogDevelopment.SitecoreProject.Tasks.dll with ..\TDSFiles\HedgehogDevelopment.SitecoreProject.Tasks.dll:
If you now run the build you will receive another error, this time it is:
This is caused because TDS can't find a license, to set this we need to go into the TDSFiles folder and open the file TDSLicence.config In this file we need to add a single XML root node with the Owner and Key attributes:
	<license Owner="CompanyName" Key="AA00-A00-0A0-A000" />
Check everything in to source control and build run a build. The build should succeed and in your drop folder you should be able to find the Sitecore update file:
comments powered by Disqus