Blog

The TDS Global Config File

May 31, 2016 | Angel Uzunov

In any normal course of a project’s lifecycle a developer could have any number of TDS projects inside the solution. In order to increase productivity (IE we are too lazy to do the same thing twice) it makes sense to share build configurations between the projects. We released this ability with the Global Config File in TDS 5.0.

If you have two TDS Projects that deploy to the same website root folder you can include this setting in the Global Config file instead of setting this up for each of the projects. There’s also a TDS Global Config User file that can be used in cases where several developers are participating on the project and each developer has to deal with multiple TDS Projects, but uses his own configuration settings.

Full documentation can be found in the TDS Help section.

To add a Global config right click on the solution in the Solution Explorer and click Add Global TDS Config File:

This will add the Solution Folder .TDS containing the file TdsGlobal.config. Opening the file will show a set of commented out settings that can be controlled at a global level. Uncommenting a property allows the developer to set a value that will be used by all the TDS projects, for example, setting a PackageAuthor for all packages generated by all TDS projects in the solution:


<!-- Packaging properties -->
<PackageAuthor>TDS Developer</PackageAuthor>
<!--
<PackagePublisher></PackagePublisher>
<PackageVersion></PackageVersion>
<PackageReadme></PackageReadme>
<SitecoreAssemblyPath></SitecoreAssemblyPath>
<GeneratePackage></GeneratePackage>
<SeperateFilesAndItems></SeperateFilesAndItems>
<AddDateTimeToPackageName></AddDateTimeToPackageName>
-->

NOTE: When a change is made to the TdsGlobal.config Visual Studio will prompt to reload all the TDS Projects, click Yes otherwise you may need to manually reload projects to see global configuration changes.

Opening the properties page for a project will now show that the Package Author value is being pulled from the global config:

Values pulled from the global config can not be altered on the project page and therefore the control is disabled. The property will also display a globe to the right of the property to indicate it is a global value.

In cases where developers already use the Global TDS config file to govern specific project properties for TDS projects across the solution, but still want to modify project properties on a per-user basis, there’s the option to create a Global config user file.

The Global config user file will override properties which are already set by the TdsGlobal.config file, and TDS will designate this with a special icon once the property has been successfully overridden:

For this to work, first a file needs to be created under the Solution root folder, and it has to be named TDSGlobal.config.user. It’s going to use the same file structure as the TDSGlobal.config file. In the screenshot above, the Package Author global setting (TDS Developer), has been overridden inside the user file with another value (TDSGlobal_user). It looks like this in the file:

<!-- Packaging properties -->
<PackageAuthor>TDSGlobal_user</PackageAuthor>
<!--
<PackagePublisher></PackagePublisher>
<PackageVersion></PackageVersion>
<PackageReadme></PackageReadme>
<SitecoreAssemblyPath>C:\Sitecore</SitecoreAssemblyPath>
<GeneratePackage>true</GeneratePackage>
<SeperateFilesAndItems>true</SeperateFilesAndItems>
<PackageExcludeCode>true</PackageExcludeCode>
<AddDateTimeToPackageName>true</AddDateTimeToPackageName>
-->

 

We hope the Global Config really helps teams as they scale their build scenarios with their solutions. As always, if you have any questions or issues our support team is there to help! Leave us some comments below and let us know what you think about the TDS Global Config file.