Sitecore TDS Tips and Tricks

What's New?

  • Developer friendly brings Sitecore items into Visual Studio while reducing developer's deployment time to almost zero.
  • YAML Serialization compatibility with Sitecore 9.2+
  • Xml Serialization for older version
  • WDP Deployment

Sitecore TDS

https://www.teamdevelopmentforsitecore.com/

Download link

https://www.teamdevelopmentforsitecore.com/Download/TDS-Classic

License

Get started with a Sitecore TDS trial license that is valid for 30 days. You can use only company email address personal will not work. Approximate cost of a developer license for initial buy. Please refer link for up-to-date cost.

Try now with a month of free trial.

Work email will only be accepted for trial signup.

Installation

The installation is straight forward choose the msi package depending on the version of Visual Studio and install it. Keep the serial key ready you would need it in the second step of the installer. Detailed instructions are available in the following link.

https://hedgehogdevelopment.github.io/tds/chapter2.html

Configuration

We have the TDS installed and now its time to create the projects. In a normal scenario you would create three projects depending on the database

  • core
  • master
  • content

In this case ensure all the projects use the same Access GUID. The access GUID will be set at /_DEV/web.config file.

Tip: Ensure Access GUID in project matches the patch config.

There are two templates available part of the installation.

  • TDS Project

    Project properties will be used to configure the connection.

  • TDS Project with Wizard

    Wizard will be promted when creating the project where you could answersto key in values for the project

Ref: https://hedgehogdevelopment.github.io/tds/chapter2.html

Tip: Dev machine we could use the user.config right click build solution would deploy. Setup the project settings and match the access guid

Deployment

Mode of deployment

One time

Deploy the content as one time and will not update after that. This would be best option for content with initial site spin up.

Sync everytime

Mostly used with the templates and items you want to be updated on every deployment.

Developer

The deployment is a breeze with Visual studio on a local environments. Once configured in Visual Studio following the documentation.

Server

The process of deployment on a build server could be acheived with wdp and the powershell script that is shipped with TDS.

  • Install web deploy 3.6 or 4.0 https://www.iis.net/downloads/microsoft/web-deploy
  • Add a new local user msdeployuser with a strong password on windows server where Sitecore content authoring is hosted
  • Open the user properties and set as non expiring password and disable change password
  • Add the user to IIS Manager Permissions at the Site level

  • Ensure "Web Deployment Agent Service" service is running

Note: PORT 8172 should be open if you plan to deploy remotely

Manual

TDS is shipped with a PublishWebDeploy.ps1 this can be used to manually deploy the package with parameters.Powershell script command to execute and manually test to ensure everything works as expected before configuring the build server.

Copy the powershell script to the samefolder as the tds package.

Please update the powershell script to support local deployments.

Open powershell as administrator and execute the following

Command for install

Octopus

Define variables for the package copy location in our case AppData/TDSDeploy

Define a step that copies over the package to the location. The script used here is shipped with TDS package.

Define a step that executes the powershell command and use the command mentioned in the previous step.

Verify Deployment

Check the Sitecore logs for the following logs also the jobs page to ensure its completed.

5104 20:32:25 INFO Deployment Statistics:

Time to parse 3803 items in master: 00:00:00.4174484

Time to deploy 3803 items: 00:01:13.5850134

Time to remove items not in the project: 00:00:00.0049902

Time to parse 158 items in core: 00:00:00.1163811

Time to deploy 158 items: 00:00:23.6200549

Time to remove items not in the project: 00:00:00.0007397

Ref:

Documentation link

Teamcity and Octopus configuration Guide link