2

Getting various errors if deploy full solution from scratch. Works fine if I deploy my TDS projects one by one in right order.

Sample error:

error TDS0005: Deploy of /sitecore/layout/renderings/customer/business planning/latest promotion failed. Reason: Field 'VaryByCustomer' does not exist in template 'Controller rendering'

Dmitry Harnitski
  • 5,838
  • 1
  • 28
  • 43

2 Answers2

3

The out-of-the-box solution to this problem is to use the "Multi-project Properties" tab in your TDS project properties.

In general, you should not deploy your TDS projects separately. Instead, you should define base template references and package bundling to define which project depends on which. Then you build and deploy only the project/package on the top of the dependency hierarchy you've defined via "Multi-project Properties".

You can read more about this in the official TDS documentation:

https://www.hhogdev.com/help/tds/propmulti

Dmytro Shevchenko
  • 33,431
  • 6
  • 51
  • 67
2

This error happens because TDS projects are deployed in wrong order. Order is especially important for Templates and Items that are inherited from these templates.

Projects execution order is defined in *.sln file as set of dependencies between projects. If project1 depends on project2, than project2 is deployed first.

VS detects these dependencies automatically for C# projects when you reference one project from another. Unfortunately, content projects like TDS does does not have code level references and dependencies has to be set manually.

To do that, perform steps below in Visual Studio:

  1. Right click on Solution in Solution Explorer
  2. Pick Properties
  3. Navigate to Project Dependencies
  4. Define Dependencies as necessary

Your Core packages should go first, next should be DEV packages that include Templates, Renderings, Placeholder Settings and etc. Your Content packages (Packages and Data) should be very last.

Dmitry Harnitski
  • 5,838
  • 1
  • 28
  • 43