private void WriteSourceControl(IProjectConfiguration config)
        {
            using (Tag("sourcecontrol"))
            {
                Attr("type", "multi");
                using (Tag("sourceControls"))
                {
                    var tfs = config as ITfsControl;
                    if (tfs != null)
                    {
                        using (Tag("vsts"))
                        {
                            Tag("executable", "$(tfsExecutable)");
                            Tag("server", "$(tfsUrl)");
                            Tag("project", tfs.TfsPath);
                            Tag("workingDirectory", tfs.SourceDirectory());
                            Tag("applyLabel", "false");
                            Tag("autoGetSource", "true");
                            Tag("cleanCopy", "true");
                            Tag("workspace", $"CCNET_{tfs.Server}_{GetQueue(config)}");
                            Tag("deleteWorkspace", "true");
                        }
                    }

                    var references = config as IReferencesDirectory;
                    if (references != null)
                    {
                        using (Tag("filesystem"))
                        {
                            Tag("repositoryRoot", references.ReferencesDirectory());
                            Tag("autoGetSource", "false");
                            Tag("ignoreMissingRoot", "true");
                        }
                    }

                    using (Tag("filesystem"))
                    {
                        Tag("repositoryRoot", config.AdminDirectoryRebuildAll());
                        Tag("autoGetSource", "false");
                        Tag("ignoreMissingRoot", "true");
                    }
                }
            }
        }
		private void WriteSourceControl(IProjectConfiguration config)
		{
			using (Tag("sourcecontrol"))
			{
				Attr("type", "multi");
				using (Tag("sourceControls"))
				{
					var tfs = config as ITfsControl;
					if (tfs != null)
					{
						using (Tag("vsts"))
						{
							Tag("executable", "$(tfsExecutable)");
							Tag("server", "$(tfsUrl)");
							Tag("project", tfs.TfsPath);
							Tag("workingDirectory", tfs.SourceDirectory());
							Tag("applyLabel", "false");
							Tag("autoGetSource", "true");
							Tag("cleanCopy", "true");
							Tag("workspace", $"CCNET_{tfs.Server}_{GetQueue(config)}");
							Tag("deleteWorkspace", "true");
						}
					}

					var references = config as IReferencesDirectory;
					if (references != null)
					{
						using (Tag("filesystem"))
						{
							Tag("repositoryRoot", references.ReferencesDirectory());
							Tag("autoGetSource", "false");
							Tag("ignoreMissingRoot", "true");
						}
					}

					using (Tag("filesystem"))
					{
						Tag("repositoryRoot", config.AdminDirectoryRebuildAll());
						Tag("autoGetSource", "false");
						Tag("ignoreMissingRoot", "true");
					}
				}
			}
		}