-
Notifications
You must be signed in to change notification settings - Fork 0
/
AzureContinuousDeployment.11.xaml
686 lines (686 loc) · 75.1 KB
/
AzureContinuousDeployment.11.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
<Activity mc:Ignorable="sad" x:Class="TfsBuild.Process" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mt="clr-namespace:Microsoft.TeamFoundation;assembly=Microsoft.TeamFoundation.Common" xmlns:mtb="clr-namespace:Microsoft.TeamFoundation.Build.Common;assembly=Microsoft.TeamFoundation.Build.Common" xmlns:mtbc="clr-namespace:Microsoft.TeamFoundation.Build.Client;assembly=Microsoft.TeamFoundation.Build.Client" xmlns:mtbw="clr-namespace:Microsoft.TeamFoundation.Build.Workflow;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:mtdwa="clr-namespace:Microsoft.TeamFoundation.Deployment.Workflow.Activities;assembly=Microsoft.TeamFoundation.Deployment.Workflow" xmlns:mtdw="clr-namespace:Microsoft.TeamFoundation.Deployment.Workflow;assembly=Microsoft.TeamFoundation.Deployment.Workflow" xmlns:mtbwa="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Activities;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:mtbwt="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Tracking;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:mttbb="clr-namespace:Microsoft.TeamFoundation.TestImpact.BuildIntegration.BuildActivities;assembly=Microsoft.TeamFoundation.TestImpact.BuildIntegration" xmlns:mtvc="clr-namespace:Microsoft.TeamFoundation.VersionControl.Client;assembly=Microsoft.TeamFoundation.VersionControl.Client" xmlns:mtvco="clr-namespace:Microsoft.TeamFoundation.VersionControl.Common;assembly=Microsoft.TeamFoundation.VersionControl.Common" xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:sad="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation" xmlns:sad1="clr-namespace:System.Activities.Debugger;assembly=System.Activities" xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:sl="clr-namespace:System.Linq;assembly=System.Core" xmlns:this="clr-namespace:TfsBuild;" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<x:Members>
<x:Property Name="SolutionToBuild" Type="InArgument(x:String)" />
<x:Property Name="ConfigurationsToBuild" Type="InArgument(mtbwa:PlatformConfigurationList)" />
<x:Property Name="TestSpecs" Type="InArgument(mtbwa:TestSpecList)" />
<x:Property Name="BuildNumberFormat" Type="InArgument(x:String)" />
<x:Property Name="CleanWorkspace" Type="InArgument(mtbwa:CleanWorkspaceOption)" />
<x:Property Name="RunCodeAnalysis" Type="InArgument(mtbwa:CodeAnalysisOption)" />
<x:Property Name="SourceAndSymbolServerSettings" Type="InArgument(mtbwa:SourceAndSymbolServerSettings)" />
<x:Property Name="AgentSettings" Type="InArgument(mtbwa:AgentSettings)" />
<x:Property Name="AssociateChangesetsAndWorkItems" Type="InArgument(x:Boolean)" />
<x:Property Name="CreateWorkItem" Type="InArgument(x:Boolean)" />
<x:Property Name="MSBuildArguments" Type="InArgument(x:String)" />
<x:Property Name="MSBuildPlatform" Type="InArgument(mtbwa:ToolPlatform)" />
<x:Property Name="MSBuildMultiProc" Type="InArgument(x:Boolean)" />
<x:Property Name="PerformTestImpactAnalysis" Type="InArgument(x:Boolean)" />
<x:Property Name="CreateLabel" Type="InArgument(x:Boolean)" />
<x:Property Name="DisableTests" Type="InArgument(x:Boolean)" />
<x:Property Name="GetVersion" Type="InArgument(x:String)" />
<x:Property Name="PrivateDropLocation" Type="InArgument(x:String)" />
<x:Property Name="Verbosity" Type="InArgument(mtbw:BuildVerbosity)" />
<x:Property Name="Metadata" Type="mtbw:ProcessParameterMetadataCollection" />
<x:Property Name="SupportedReasons" Type="mtbc:BuildReason" />
<x:Property Name="DeploymentEnvironmentName" Type="InArgument(x:String)" />
<x:Property Name="AllowUntrustedCertificates" Type="InArgument(x:Boolean)" />
<!-- Additional Cloud Service Overrides -->
<x:Property Name="AlternatePublishProfile" Type="InArgument(x:String)" />
<x:Property Name="AlternateHostedServiceName" Type="InArgument(x:String)" />
<x:Property Name="AllowUpgrade" Type="InArgument(x:Boolean)" />
<!-- NOTE: this deliberately a String instead of Enum type so it can easily be set by server code. -->
<x:Property Name="AlternateDeploymentSlot" Type="InArgument(x:String)" />
<x:Property Name="AlternateStorageAccountName" Type="InArgument(x:String)" />
<x:Property Name="AlternateDeploymentLabel" Type="InArgument(x:String)" />
<x:Property Name="AlternateServiceConfiguration" Type="InArgument(x:String)" />
<!-- Additional Web Deploy Overrides -->
<x:Property Name="AlternateWebDeployPublishProfile" Type="InArgument(x:String)" />
</x:Members>
<this:Process.SolutionToBuild>
<InArgument x:TypeArguments="x:String" />
</this:Process.SolutionToBuild>
<this:Process.ConfigurationsToBuild>[New Microsoft.TeamFoundation.Build.Workflow.Activities.PlatformConfigurationList()]</this:Process.ConfigurationsToBuild>
<this:Process.DisableTests>[False]</this:Process.DisableTests>
<this:Process.TestSpecs>[New Microsoft.TeamFoundation.Build.Workflow.Activities.TestSpecList(New Microsoft.TeamFoundation.Build.Workflow.Activities.AgileTestPlatformSpec("**\*test*.dll") With { .FailBuildOnFailure = True } )]</this:Process.TestSpecs>
<this:Process.BuildNumberFormat>["$(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.r)"]</this:Process.BuildNumberFormat>
<this:Process.AssociateChangesetsAndWorkItems>[True]</this:Process.AssociateChangesetsAndWorkItems>
<this:Process.CreateWorkItem>[True]</this:Process.CreateWorkItem>
<this:Process.CleanWorkspace>[Microsoft.TeamFoundation.Build.Workflow.Activities.CleanWorkspaceOption.All]</this:Process.CleanWorkspace>
<this:Process.MSBuildArguments>
<InArgument x:TypeArguments="x:String" />
</this:Process.MSBuildArguments>
<this:Process.RunCodeAnalysis>[Microsoft.TeamFoundation.Build.Workflow.Activities.CodeAnalysisOption.AsConfigured]</this:Process.RunCodeAnalysis>
<this:Process.MSBuildMultiProc>[True]</this:Process.MSBuildMultiProc>
<this:Process.MSBuildPlatform>[Microsoft.TeamFoundation.Build.Workflow.Activities.ToolPlatform.Auto]</this:Process.MSBuildPlatform>
<this:Process.PerformTestImpactAnalysis>[True]</this:Process.PerformTestImpactAnalysis>
<this:Process.SourceAndSymbolServerSettings>[New Microsoft.TeamFoundation.Build.Workflow.Activities.SourceAndSymbolServerSettings(True, Nothing)]</this:Process.SourceAndSymbolServerSettings>
<this:Process.CreateLabel>[True]</this:Process.CreateLabel>
<this:Process.GetVersion>
<InArgument x:TypeArguments="x:String" />
</this:Process.GetVersion>
<this:Process.AgentSettings>[New Microsoft.TeamFoundation.Build.Workflow.Activities.AgentSettings() With {.MaxWaitTime = New System.TimeSpan(4, 0, 0), .MaxExecutionTime = New System.TimeSpan(0, 0, 0), .TagComparison = Microsoft.TeamFoundation.Build.Workflow.Activities.TagComparison.MatchExactly }]</this:Process.AgentSettings>
<this:Process.Verbosity>[Microsoft.TeamFoundation.Build.Workflow.BuildVerbosity.Normal]</this:Process.Verbosity>
<this:Process.AllowUntrustedCertificates>[True]</this:Process.AllowUntrustedCertificates>
<this:Process.AllowUpgrade>[True]</this:Process.AllowUpgrade>
<this:Process.Metadata>
<mtbw:ProcessParameterMetadataCollection>
<mtbw:ProcessParameterMetadata BrowsableWhen="EditingDefinition" Category="#100 Required" Required="True" DisplayName="Solution To Build" Description="The solution to build, package and deploy." ParameterName="SolutionToBuild" Editor="Microsoft.TeamFoundation.Build.Controls.ServerFileBrowserEditor, Microsoft.TeamFoundation.Build.Controls" />
<mtbw:ProcessParameterMetadata BrowsableWhen="EditingDefinition" Category="#200 Basic" DisplayName="Configuration To Build" Description="The configuration to build." ParameterName="ConfigurationsToBuild" />
<mtbw:ProcessParameterMetadata BrowsableWhen="EditingDefinition" Category="#300 Advanced" DisplayName="MSBuild Multi-Proc" Description="Enable MSBuild Multi-proc to build your solutions' projects in parallel, when possible, using all available processors on the build server." ParameterName="MSBuildMultiProc" />
<mtbw:ProcessParameterMetadata BrowsableWhen="EditingDefinition" Category="#300 Advanced" DisplayName="Solution Specific Build Outputs" Description="True will put build outputs into folders based on the solution name. False will put all build outputs into the same folder." ParameterName="SolutionSpecificBuildOutputs" />
<mtbw:ProcessParameterMetadata BrowsableWhen="Always" Category="#400 Publishing -- General" Description="The named set of Deployment Settings to use for Application Deployment." DisplayName="Deployment Settings Name" ParameterName="DeploymentEnvironmentName" />
<mtbw:ProcessParameterMetadata BrowsableWhen="Always" Category="#400 Publishing -- General" Description="True will allow non-rooted certificates during deployment." DisplayName="Allow Untrusted Certificates" ParameterName="AllowUntrustedCertificates" />
<mtbw:ProcessParameterMetadata BrowsableWhen="Always" Category="#500 Publishing -- Azure Cloud Service" Description="Specify a source control path to an alternate publish profile." DisplayName="Alternate Publish Profile" ParameterName="AlternatePublishProfile" Editor="Microsoft.TeamFoundation.Build.Controls.ServerFileBrowserEditor, Microsoft.TeamFoundation.Build.Controls" />
<mtbw:ProcessParameterMetadata BrowsableWhen="Always" Category="#500 Publishing -- Azure Cloud Service" Description="Specify the name of an alternate storage account." DisplayName="Alternate Storage Account Name" ParameterName="AlternateStorageAccountName" />
<mtbw:ProcessParameterMetadata BrowsableWhen="Always" Category="#500 Publishing -- Azure Cloud Service" Description="Specify the Cloud Service Environment: Production or Staging." DisplayName="Alternate Cloud Service Environment" ParameterName="AlternateDeploymentSlot" />
<mtbw:ProcessParameterMetadata BrowsableWhen="Always" Category="#500 Publishing -- Azure Cloud Service" Description="Specify an alternate deployment label." DisplayName="Alternate Deployment Label" ParameterName="AlternateDeploymentLabel" />
<mtbw:ProcessParameterMetadata BrowsableWhen="Always" Category="#500 Publishing -- Azure Cloud Service" Description="Specify an alternate Cloud Service name." DisplayName="Alternate Cloud Service Name" ParameterName="AlternateHostedServiceName" />
<mtbw:ProcessParameterMetadata BrowsableWhen="Always" Category="#500 Publishing -- Azure Cloud Service" Description="Specify an alternate service configuration." DisplayName="Alternate Service Configuration" ParameterName="AlternateServiceConfiguration" />
<mtbw:ProcessParameterMetadata BrowsableWhen="Always" Category="#500 Publishing -- Azure Cloud Service" Description="Specify whether upgrade is allowed on deployment." DisplayName="Allow Upgrade" ParameterName="AllowUpgrade" />
<mtbw:ProcessParameterMetadata BrowsableWhen="Always" Category="#600 Publishing -- Azure Website" Description="Specify a source control path to a Web Deploy publish profile." DisplayName="Web Deploy Publish Profile" ParameterName="AlternateWebDeployPublishProfile" Editor="Microsoft.TeamFoundation.Build.Controls.ServerFileBrowserEditor, Microsoft.TeamFoundation.Build.Controls" />
</mtbw:ProcessParameterMetadataCollection>
</this:Process.Metadata>
<this:Process.SupportedReasons>All</this:Process.SupportedReasons>
<mva:VisualBasic.Settings>Assembly references and imported namespaces serialized as XML namespaces</mva:VisualBasic.Settings>
<Sequence mtbwt:BuildTrackingParticipant.Importance="None">
<Sequence.Variables>
<Variable x:TypeArguments="mtbc:IBuildDetail" Name="BuildDetail" />
<Variable x:TypeArguments="x:String" Name="DropLocation" />
<Variable x:TypeArguments="mtbwa:PlatformConfiguration" Name="ConfigurationToBuild" />
</Sequence.Variables>
<mtbwa:GetBuildDetail DisplayName="Get the Build" Result="[BuildDetail]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<Sequence DisplayName="Update Drop Location" mtbwt:BuildTrackingParticipant.Importance="Low">
<mtbwa:InvokeForReason DisplayName="Update Build Number for Triggered Builds" Reason="Triggered">
<mtbwa:UpdateBuildNumber BuildNumberFormat="[BuildNumberFormat]" DisplayName="Update Build Number" />
</mtbwa:InvokeForReason>
<If Condition="[(Not String.IsNullOrEmpty(BuildDetail.DropLocationRoot)) AndAlso (BuildDetail.Reason And Microsoft.TeamFoundation.Build.Client.BuildReason.Triggered) = BuildDetail.Reason]" DisplayName="If Build Reason is Triggered" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<Sequence mtbwt:BuildTrackingParticipant.Importance="None">
<Assign x:TypeArguments="x:String" mtbwt:BuildTrackingParticipant.Importance="None" Value="[BuildDropProvider.CombinePaths(BuildDetail.DropLocationRoot, BuildDetail.BuildDefinition.Name, BuildDetail.BuildNumber)]" To="[DropLocation]" />
<mtbwa:SetBuildProperties DisplayName="Set Drop Location" DropLocation="[DropLocation]" PropertiesToSet="DropLocation" mtbwt:BuildTrackingParticipant.Importance="Low" />
</Sequence>
</If.Then>
</If>
<If Condition="[(Not String.IsNullOrEmpty(PrivateDropLocation)) AndAlso BuildDetail.Reason = Microsoft.TeamFoundation.Build.Client.BuildReason.ValidateShelveset]" DisplayName="If Build Reason is ValidateShelveset" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<Sequence mtbwt:BuildTrackingParticipant.Importance="None">
<Assign x:TypeArguments="x:String" Value="[BuildDropProvider.CombinePaths(PrivateDropLocation, BuildDetail.BuildDefinition.Name, BuildDetail.BuildNumber)]" To="[DropLocation]" mtbwt:BuildTrackingParticipant.Importance="None" />
<mtbwa:SetBuildProperties DisplayName="Set Drop Location for Private Build" DropLocation="[DropLocation]" PropertiesToSet="DropLocation" mtbwt:BuildTrackingParticipant.Importance="Low" />
</Sequence>
</If.Then>
</If>
</Sequence>
<mtbwa:AgentScope DisplayName="Run On Agent" MaxExecutionTime="[AgentSettings.MaxExecutionTime]" MaxWaitTime="[AgentSettings.MaxWaitTime]" ReservationSpec="[AgentSettings.GetAgentReservationSpec()]">
<mtbwa:AgentScope.Variables>
<Variable x:TypeArguments="mtbc:IBuildAgent" Name="BuildAgent" />
<Variable x:TypeArguments="mtvc:Workspace" Name="Workspace" />
<Variable x:TypeArguments="x:String" Name="BuildDirectory" />
<Variable x:TypeArguments="x:String" Default="[BuildDetail.BuildNumber]" Name="LabelName" />
<Variable x:TypeArguments="x:String" Name="WorkspaceName" />
<Variable x:TypeArguments="x:String" Name="SourcesDirectory" />
<Variable x:TypeArguments="x:String" Name="BinariesDirectory" />
<Variable x:TypeArguments="x:String" Name="TestResultsDirectory" />
</mtbwa:AgentScope.Variables>
<Sequence DisplayName="Initialize Variables" mtbwt:BuildTrackingParticipant.Importance="Low">
<mtbwa:GetBuildAgent DisplayName="Get the Agent" Result="[BuildAgent]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<mtbwa:GetBuildDirectory DisplayName="Get the Build Directory" Result="[BuildDirectory]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<Assign x:TypeArguments="x:String" DisplayName="Initialize Workspace Name" To="[WorkspaceName]" Value="[String.Format("{0}_{1}_{2}", BuildDetail.BuildDefinition.Id, Microsoft.TeamFoundation.LinkingUtilities.DecodeUri(BuildAgent.Uri.AbsoluteUri).ToolSpecificId, BuildAgent.ServiceHost.Name)]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<Assign x:TypeArguments="x:String" DisplayName="Initialize Sources Directory" To="[SourcesDirectory]" Value="[String.Format("{0}\src", BuildDirectory)]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<Assign x:TypeArguments="x:String" DisplayName="Initialize Binaries Directory" To="[BinariesDirectory]" Value="[String.Format("{0}\bin", BuildDirectory)]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<Assign x:TypeArguments="x:String" DisplayName="Initialize TestResults Directory" To="[TestResultsDirectory]" Value="[String.Format("{0}\tst", BuildDirectory)]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<If Condition="[ConfigurationsToBuild.Count = 0]" DisplayName="If ConfigurationsToBuild Is Empty" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<Assign x:TypeArguments="mtbwa:PlatformConfiguration" DisplayName="Use Default Platform Configuration" To="[ConfigurationToBuild]" Value="[Microsoft.TeamFoundation.Build.Workflow.Activities.PlatformConfiguration.Default]" mtbwt:BuildTrackingParticipant.Importance="Low" />
</If.Then>
<If.Else>
<Assign x:TypeArguments="mtbwa:PlatformConfiguration" DisplayName="Use user's Platform Configuration" To="[ConfigurationToBuild]" Value="[ConfigurationsToBuild(0)]" mtbwt:BuildTrackingParticipant.Importance="Low" />
</If.Else>
</If>
<If Condition="[WorkspaceName.Length > Microsoft.TeamFoundation.VersionControl.Common.RepositoryConstants.MaxWorkspaceNameSize]" DisplayName="If WorkspaceName > MaxSize" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<Sequence mtbwt:BuildTrackingParticipant.Importance="None">
<mtbwa:WriteBuildWarning DisplayName="Write Workspace Size Warning" Message="[String.Format("The workspace name '{0}' exceeds the maximum allowed limit of '{1}' characters. Truncating it to match the maximum limit.", WorkspaceName, Microsoft.TeamFoundation.VersionControl.Common.RepositoryConstants.MaxWorkspaceNameSize)]" />
<Assign x:TypeArguments="x:String" DisplayName="Truncate WorkspaceName to MaxSize" To="[WorkspaceName]" Value="[WorkspaceName.Substring(0, Microsoft.TeamFoundation.VersionControl.Common.RepositoryConstants.MaxWorkspaceNameSize).TrimEnd()]" mtbwt:BuildTrackingParticipant.Importance="Low" />
</Sequence>
</If.Then>
</If>
</Sequence>
<Sequence DisplayName="Initialize Workspace" mtbwt:BuildTrackingParticipant.Importance="Low">
<mtbwa:DeleteDirectory Directory="[TestResultsDirectory]" DisplayName="Delete Test Results Directory" Recursive="[True]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<If Condition="[Not CleanWorkspace = Microsoft.TeamFoundation.Build.Workflow.Activities.CleanWorkspaceOption.None]" DisplayName="If Not CleanWorkspace = CleanWorkspaceOption.None" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<mtbwa:DeleteDirectory Directory="[BinariesDirectory]" DisplayName="Delete Binaries Directory" mtbwt:BuildTrackingParticipant.Importance="Low" />
</If.Then>
</If>
<If Condition="[CleanWorkspace = Microsoft.TeamFoundation.Build.Workflow.Activities.CleanWorkspaceOption.All]" DisplayName="If CleanWorkspace = CleanWorkspaceOption.All" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<Sequence DisplayName="Delete Workspace and Sources Directory" mtbwt:BuildTrackingParticipant.Importance="Low">
<mtbwa:DeleteWorkspace DeleteLocalItems="[True]" DisplayName="Delete Workspace" Name="[WorkspaceName]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<mtbwa:DeleteDirectory Directory="[SourcesDirectory]" DisplayName="Delete Sources Directory" mtbwt:BuildTrackingParticipant.Importance="Low" />
</Sequence>
</If.Then>
</If>
<mtbwa:CreateWorkspace BuildDirectory="[BuildDirectory]" Comment="["Workspace Created by Team Build"]" DisplayName="Create Workspace" Name="[WorkspaceName]" Result="[Workspace]" SourcesDirectory="[SourcesDirectory]" />
<If Condition="[CleanWorkspace = Microsoft.TeamFoundation.Build.Workflow.Activities.CleanWorkspaceOption.Outputs]" DisplayName="If CleanWorkspace = CleanWorkspaceOption.Outputs" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<Sequence DisplayName="Clean Configuration">
<If Condition="[Not String.IsNullOrEmpty(SolutionToBuild)]" DisplayName="If SolutionToBuild is Not Nothing" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<Sequence DisplayName="Clean Project" mtbwt:BuildTrackingParticipant.Importance="Low">
<Sequence.Variables>
<Variable x:TypeArguments="x:String" Name="localBuildProjectItem" />
</Sequence.Variables>
<mtbwa:ConvertWorkspaceItem DisplayName="Convert Server Paths to Local Paths" Input="[SolutionToBuild]" Result="[localBuildProjectItem]" Workspace="[Workspace]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<If Condition="[System.IO.File.Exists(localBuildProjectItem)]" DisplayName="If File.Exists(Project)" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<mtbwa:MSBuild CommandLineArguments="[String.Format("/p:SkipInvalidConfigurations=true {0}", MSBuildArguments)]" Configuration="[ConfigurationToBuild.Configuration]" DisplayName="Run MSBuild for Project" GenerateVSPropsFile="[True]" MaxProcesses="[If (MSBuildMultiProc, 0, 1)]" OutDir="[BinariesDirectory]" Platform="[ConfigurationToBuild.Platform]" Project="[localBuildProjectItem]" Targets="[New String() { "Clean" }]" TargetsNotLogged="[New String() {"GetNativeManifest", "GetCopyToOutputDirectoryItems", "GetTargetPath"}]" ToolPlatform="[MSBuildPlatform]" Verbosity="[Verbosity]" />
</If.Then>
</If>
</Sequence>
</If.Then>
</If>
</Sequence>
</If.Then>
</If>
<mtbwa:SyncWorkspace DisplayName="Get Workspace" VersionOverride="[GetVersion]" Workspace="[Workspace]">
<mtbwa:SyncWorkspace.RequestsFailed>
<ActivityAction x:TypeArguments="scg:ICollection(mtbc:IQueuedBuild)">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="scg:ICollection(mtbc:IQueuedBuild)" Name="failedRequests" />
</ActivityAction.Argument>
<mtbwa:RetryRequests Behavior="[Microsoft.TeamFoundation.Build.Workflow.Activities.RetryBehavior.DoNotBatch]" DisplayName="Mark Requests for Retry" Requests="[failedRequests]" mtbwt:BuildTrackingParticipant.Importance="Low" />
</ActivityAction>
</mtbwa:SyncWorkspace.RequestsFailed>
</mtbwa:SyncWorkspace>
</Sequence>
<If Condition="[CreateLabel]" DisplayName="If CreateLabel" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<mtbwa:InvokeForReason DisplayName="Create and Set Label for non-Shelveset Builds" Reason="Manual, IndividualCI, BatchedCI, Schedule, ScheduleForced, UserCreated">
<mtbwa:LabelWorkspace Comment="["Label Created by Team Build"]" DisplayName="Create Label" Name="[LabelName]" Scope="[String.Format("$/{0}", BuildDetail.BuildDefinition.TeamProject)]" Workspace="[Workspace]" />
<mtbwa:SetBuildProperties DisplayName="Set Label on BuildDetail" LabelName="[String.Format("{0}@$/{1}", LabelName, BuildDetail.BuildDefinition.TeamProject)]" PropertiesToSet="LabelName" mtbwt:BuildTrackingParticipant.Importance="Low" />
</mtbwa:InvokeForReason>
</If.Then>
<If.Else>
<mtbwa:WriteBuildMessage DisplayName="Write Message" Message="Not Labeling sources" Importance="[Microsoft.TeamFoundation.Build.Client.BuildMessageImportance.High]" />
</If.Else>
</If>
<TryCatch DisplayName="Try Compile, Test, and Associate Changesets and Work Items" mtbwt:BuildTrackingParticipant.Importance="Low">
<TryCatch.Finally>
<Sequence DisplayName="Revert Workspace and Copy Files to Drop Location" mtbwt:BuildTrackingParticipant.Importance="Low">
<mtbwa:InvokeForReason DisplayName="Revert Workspace for Shelveset Builds" Reason="CheckInShelveset, ValidateShelveset">
<mtbwa:RevertWorkspace DisplayName="Revert Workspace" Workspace="[Workspace]" />
</mtbwa:InvokeForReason>
<If Condition="[Not String.IsNullOrEmpty(DropLocation)]" DisplayName="If DropLocation is Set" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<mtbwa:CopyDirectory DisplayName="Drop Files to Drop Location" Source="[BinariesDirectory]" Destination="[DropLocation]" />
</If.Then>
</If>
</Sequence>
</TryCatch.Finally>
<TryCatch.Try>
<Sequence mtbwt:BuildTrackingParticipant.Importance="None">
<Sequence.Variables>
<Variable x:TypeArguments="s:Exception" Name="compilationException" />
<Variable x:TypeArguments="scg:IList(mtvc:Changeset)" Name="associatedChangesets" />
<Variable x:TypeArguments="s:Boolean" Name="treatTestFailureAsBuildFailure" />
</Sequence.Variables>
<Parallel DisplayName="Compile, Test, and Associate Changesets and Work Items">
<TryCatch DisplayName="Try Compile and Test" mtbwt:BuildTrackingParticipant.Importance="Low">
<TryCatch.Try>
<Sequence DisplayName="Compile and Test">
<Sequence mtbwt:BuildTrackingParticipant.Importance="None">
<Sequence.Variables>
<Variable x:TypeArguments="x:String" Name="outputDirectory" />
<Variable x:TypeArguments="x:String" Name="logFileDropLocation" />
<Variable x:TypeArguments="mtbc:DeploymentEnvironment" Name="deploymentEnvironment" />
<Variable x:TypeArguments="mtdw:MSDeployProfile" Name="azureWebSiteProfile" />
<Variable x:TypeArguments="mtb:AzureCloudAppProfile" Name="azureCloudAppProfile" />
<Variable x:TypeArguments="x:Boolean" Name="deployOutput" Default="False" />
<Variable x:TypeArguments="x:String" Name="targetSite" />
<Variable x:TypeArguments="x:String" Name="AlternateWebDeployPublishProfileName" />
<Variable x:TypeArguments="x:Boolean" Name="CreateWebDeployPackage" Default="False" />
</Sequence.Variables>
<Sequence DisplayName="Initialize Variables" mtbwt:BuildTrackingParticipant.Importance="Low">
<Assign x:TypeArguments="x:String" DisplayName="Create OutputDirectory" To="[outputDirectory]" Value="[BinariesDirectory]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<If Condition="[Not String.IsNullOrEmpty(DropLocation)]" DisplayName="If DropLocation is Set" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<Assign x:TypeArguments="x:String" DisplayName="Initialize LogFile Drop Location" To="[logFileDropLocation]" Value="[BuildDropProvider.CombinePaths(DropLocation, "logs")]" mtbwt:BuildTrackingParticipant.Importance="Low" />
</If.Then>
</If>
<If Condition="[Not String.IsNullOrEmpty(DeploymentEnvironmentName)]" DisplayName="If DeploymentEnvironmentName is Set" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<Sequence mtbwt:BuildTrackingParticipant.Importance="None">
<mtdwa:GetDeploymentEnvironment DisplayName="Get Deployment Environment" DeploymentEnvironmentName="[DeploymentEnvironmentName]" Result="[deploymentEnvironment]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<Assign x:TypeArguments="x:Boolean" DisplayName="Set Deploy Output to True" mtbwt:BuildTrackingParticipant.Importance="Low" Value="True" To="[deployOutput]" />
<If Condition="[deploymentEnvironment.EnvironmentMetadata.Kind = Microsoft.TeamFoundation.Build.Client.DeploymentEnvironmentKind.AzureWebSite]" DisplayName="If DeploymentEnvironment is Azure Web Site" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<Sequence mtbwt:BuildTrackingParticipant.Importance="None">
<mtdwa:GetAzureWebsitePublishProfile DisplayName="Fetch Azure Web Site Publish Profile" ConnectedService="[deploymentEnvironment.ConnectedService]" WebsiteEnvironment="[deploymentEnvironment]" AllowUntrustedCertificates="[AllowUntrustedCertificates]" Result="[azureWebSiteProfile]" />
<Assign x:TypeArguments="x:Boolean" DisplayName="Set Create Web Deploy Package to True" mtbwt:BuildTrackingParticipant.Importance="Low" Value="True" To="[CreateWebDeployPackage]" />
<!-- The following value is passed to MSBuild for packaging -->
<Assign x:TypeArguments="x:String" DisplayName="Set Target Site Variable" mtbwt:BuildTrackingParticipant.Importance="Low" Value="[azureWebSiteProfile.MSDeploySite]" To="[targetSite]" />
<If Condition="[Not String.IsNullOrEmpty(AlternateWebDeployPublishProfile)]" mtbwt:BuildTrackingParticipant.Importance="Low" DisplayName="If Use Alternate Web Deploy Publish Profile">
<If.Then>
<Sequence mtbwt:BuildTrackingParticipant.Importance="None">
<Sequence.Variables>
<Variable x:TypeArguments="x:String" Name="localProfile" />
</Sequence.Variables>
<mtbwa:ConvertWorkspaceItem DisplayName="Convert Server Path to Local Path" Input="[AlternateWebDeployPublishProfile]" Result="[localProfile]" Workspace="[Workspace]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<Assign x:TypeArguments="x:String" mtbwt:BuildTrackingParticipant.Importance="Low" DisplayName="Record Alternate Web Deploy Publish Profile Name" To="[AlternateWebDeployPublishProfileName]" Value="[System.IO.Path.GetFileNameWithoutExtension(localProfile)]" />
</Sequence>
</If.Then>
</If>
</Sequence>
</If.Then>
</If>
<If Condition="[deploymentEnvironment.EnvironmentMetadata.Kind = Microsoft.TeamFoundation.Build.Client.DeploymentEnvironmentKind.AzureCloudApp]" DisplayName="If DeploymentEnvironment is Azure Cloud Service" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<Sequence mtbwt:BuildTrackingParticipant.Importance="None">
<If Condition="[String.IsNullOrEmpty(AlternatePublishProfile)]" mtbwt:BuildTrackingParticipant.Importance="Low" DisplayName="If Use Default Publish Profile">
<If.Then>
<mtdwa:GetAzureCloudAppPublishProfile DisplayName="Get Default Azure Cloud Service Publish Profile" CloudAppEnvironment="[deploymentEnvironment]" Result="[azureCloudAppProfile]" />
</If.Then>
<If.Else>
<Sequence mtbwt:BuildTrackingParticipant.Importance="None">
<Sequence.Variables>
<Variable x:TypeArguments="x:String" Name="localProfile" />
</Sequence.Variables>
<mtbwa:ConvertWorkspaceItem DisplayName="Convert Server Path to Local Path" Input="[AlternatePublishProfile]" Result="[localProfile]" Workspace="[Workspace]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<Assign x:TypeArguments="mtb:AzureCloudAppProfile" mtbwt:BuildTrackingParticipant.Importance="Low" DisplayName="Load Alternate Publish Profile" To="[azureCloudAppProfile]" Value="[AzureCloudAppProfile.Parse(System.IO.File.ReadAllText(localProfile))]" />
</Sequence>
</If.Else>
</If>
<If Condition="[Not String.IsNullOrEmpty(AlternateHostedServiceName)]" mtbwt:BuildTrackingParticipant.Importance="Low" DisplayName="If Alternate Cloud Service name is set.">
<If.Then>
<Assign x:TypeArguments="x:String" mtbwt:BuildTrackingParticipant.Importance="Low" DisplayName="Set Alternate Cloud Service name in profile." To="[azureCloudAppProfile.AzureHostedServiceName]" Value="[AlternateHostedServiceName]" />
</If.Then>
</If>
<If Condition="[Not String.IsNullOrEmpty(AlternateDeploymentSlot)]" mtbwt:BuildTrackingParticipant.Importance="Low" DisplayName="If Alternate Deployment Slot is set.">
<If.Then>
<Assign x:TypeArguments="mtb:AzureDeploymentSlot" mtbwt:BuildTrackingParticipant.Importance="Low" DisplayName="Set Alternate Deployment Slot in profile." To="[azureCloudAppProfile.AzureSlot]" Value="[CType([Enum].Parse(GetType(AzureDeploymentSlot), AlternateDeploymentSlot, True), AzureDeploymentSlot)]" />
</If.Then>
</If>
<If Condition="[Not String.IsNullOrEmpty(AlternateStorageAccountName)]" mtbwt:BuildTrackingParticipant.Importance="Low" DisplayName="If Alternate Storage Account Name is set.">
<If.Then>
<Assign x:TypeArguments="x:String" mtbwt:BuildTrackingParticipant.Importance="Low" DisplayName="Set Alternate Storage Account Name in profile." To="[azureCloudAppProfile.AzureStorageAccountName]" Value="[AlternateStorageAccountName]" />
</If.Then>
</If>
<If Condition="[Not String.IsNullOrEmpty(AlternateServiceConfiguration)]" mtbwt:BuildTrackingParticipant.Importance="Low" DisplayName="If Alternate Service Configuration is set.">
<If.Then>
<Assign x:TypeArguments="x:String" mtbwt:BuildTrackingParticipant.Importance="Low" DisplayName="Set Alternate Service Configuration in profile." To="[azureCloudAppProfile.AzureServiceConfiguration]" Value="[AlternateServiceConfiguration]" />
</If.Then>
</If>
<If Condition="[Not String.IsNullOrEmpty(AlternateDeploymentLabel)]" mtbwt:BuildTrackingParticipant.Importance="Low" DisplayName="If Alternate Deployment Label is set.">
<If.Then>
<Assign x:TypeArguments="x:String" mtbwt:BuildTrackingParticipant.Importance="Low" DisplayName="Set Alternate Deployment Label in profile." To="[azureCloudAppProfile.AzureDeploymentLabel]" Value="[AlternateDeploymentLabel]" />
</If.Then>
</If>
<If Condition="[Not AllowUpgrade = azureCloudAppProfile.AzureAllowUpgrade]" mtbwt:BuildTrackingParticipant.Importance="Low" DisplayName="If Allow Upgrade is overridden">
<If.Then>
<Assign x:TypeArguments="x:Boolean" mtbwt:BuildTrackingParticipant.Importance="Low" DisplayName="Set Allow Upgrade in profile." To="[azureCloudAppProfile.AzureAllowUpgrade]" Value="[AllowUpgrade]" />
</If.Then>
</If>
<If Condition="[(Not ConfigurationToBuild.IsConfigurationEmpty) AndAlso (Not String.IsNullOrEmpty(azureCloudAppProfile.AzureSolutionConfiguration))]" DisplayName="If Build Configuration and Azure Profile Solution Configuration are set." mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<If Condition="[Not (String.Compare(ConfigurationToBuild.Configuration, azureCloudAppProfile.AzureSolutionConfiguration, System.Globalization.CultureInfo.InvariantCulture, System.Globalization.CompareOptions.OrdinalIgnoreCase) = 0)]" DisplayName="If Build Configuration and Azure Profile Solution Profile Configuration are not equal." mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<Sequence mtbwt:BuildTrackingParticipant.Importance="None">
<Assign x:TypeArguments="x:Boolean" DisplayName="Set Deploy Output to False" mtbwt:BuildTrackingParticipant.Importance="Low" Value="False" To="[deployOutput]" />
<mtbwa:WriteBuildMessage DisplayName="Write Message" Message="[String.Format("This build will not be deployed because the build configuration -- {0} -- and the Azure Profile Solution Configuration -- {1} -- do not match.", ConfigurationToBuild.Configuration, azureCloudAppProfile.AzureSolutionConfiguration)]" Importance="[Microsoft.TeamFoundation.Build.Client.BuildMessageImportance.Normal]" />
</Sequence>
</If.Then>
</If>
</If.Then>
</If>
</Sequence>
</If.Then>
</If>
<If Condition="[deployOutput]" DisplayName="Deploy Output" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<Sequence mtbwt:BuildTrackingParticipant.Importance="None">
<mtdwa:UpdateDeployment BuildDetail="[BuildDetail]" Stage="[Microsoft.TeamFoundation.Deployment.Workflow.Activities.DeploymentStage.Start]" DeploymentEnvironmentName="[deploymentEnvironment.EnvironmentMetadata.Name]" DisplayName="Mark this build as including a deployment" mtbwt:BuildTrackingParticipant.Importance="Low" />
<If Condition="[deploymentEnvironment.EnvironmentMetadata.Kind = Microsoft.TeamFoundation.Build.Client.DeploymentEnvironmentKind.AzureCloudApp]" DisplayName="If DeploymentEnvironment is Azure Cloud Service" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<mtdwa:UpdateDeployment BuildDetail="[BuildDetail]" Stage="[Microsoft.TeamFoundation.Deployment.Workflow.Activities.DeploymentStage.AddProperty]" PropertyKey="AzureSlot" PropertyValue="[azureCloudAppProfile.AzureSlot.ToString()]" DisplayName="Add AzureSlot property to the deployment" mtbwt:BuildTrackingParticipant.Importance="Low" />
</If.Then>
</If>
</Sequence>
</If.Then>
</If>
</Sequence>
</If.Then>
</If>
</Sequence>
<If Condition="[Not String.IsNullOrEmpty(SolutionToBuild)]" DisplayName="If SolutionToBuild is Not Nothing" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<TryCatch DisplayName="Try to Compile the Project" mtbwt:BuildTrackingParticipant.Importance="Low">
<TryCatch.Try>
<Sequence DisplayName="Compile the Project" mtbwt:BuildTrackingParticipant.Importance="Low">
<Sequence.Variables>
<Variable x:TypeArguments="x:String" Name="localProject" />
</Sequence.Variables>
<mtbwa:ConvertWorkspaceItem DisplayName="Convert Server Path to Local Path" Input="[SolutionToBuild]" Result="[localProject]" Workspace="[Workspace]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<If Condition="[(deploymentEnvironment IsNot Nothing) AndAlso (deploymentEnvironment.EnvironmentMetadata.Kind = Microsoft.TeamFoundation.Build.Client.DeploymentEnvironmentKind.AzureCloudApp)]" DisplayName="If Deployment Environment is Azure Cloud Service" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<Sequence mtbwt:BuildTrackingParticipant.Importance="None">
<Sequence.Variables>
<Variable x:TypeArguments="x:String" Name="ccprojName" />
</Sequence.Variables>
<mtdwa:FindCCProjInSln DisplayName="Find the Azure Project in the Solution" mtbwt:BuildTrackingParticipant.Importance="Low" SolutionPath="[localProject]" Result="[ccprojName]" />
<Assign x:TypeArguments="x:String" DisplayName="Set Project to build CSPack" To="[MSBuildArguments]" Value="[String.Format("/t:{0}:Publish /p:PublishDir=""{1}/app.publish/"" {2}", ccprojName, outputDirectory, MSBuildArguments)]" />
<If Condition="[Not String.IsNullOrEmpty(azureCloudAppProfile.AzureServiceConfiguration)]" DisplayName="If Service Configuration is specified" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<Assign x:TypeArguments="x:String" DisplayName="Set Azure Service Configuration" To="[MSBuildArguments]" Value="[String.Format("/p:TargetProfile={0} {1}", azureCloudAppProfile.AzureServiceConfiguration, MSBuildArguments)]" />
</If.Then>
</If>
</Sequence>
</If.Then>
</If>
<If Condition="[Not String.IsNullOrEmpty(AlternateWebDeployPublishProfileName) AndAlso (deploymentEnvironment.EnvironmentMetadata.Kind = Microsoft.TeamFoundation.Build.Client.DeploymentEnvironmentKind.AzureWebSite)]" DisplayName="If DeploymentEnvironment is Azure Web Site" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<Assign x:TypeArguments="x:String" DisplayName="Set Web Deploy Publish Profile" To="[MSBuildArguments]" Value="[String.Format("/p:WebPublishMethod=Package;PublishProfile=""{0}"" {1}", AlternateWebDeployPublishProfileName, MSBuildArguments)]" mtbwt:BuildTrackingParticipant.Importance="Low" />
</If.Then>
</If>
<mtbwa:MSBuild CommandLineArguments="[String.Format("/p:SkipInvalidConfigurations=true {0}", MSBuildArguments)]" Configuration="[ConfigurationToBuild.Configuration]" DisplayName="Run MSBuild for Project" GenerateVSPropsFile="[True]" LogFileDropLocation="[logFileDropLocation]" MaxProcesses="[If (MSBuildMultiProc, 0, 1)]" OutDir="[outputDirectory]" Platform="[ConfigurationToBuild.Platform]" Project="[localProject]" RunCodeAnalysis="[RunCodeAnalysis]" TargetsNotLogged="[New String() {"GetNativeManifest", "GetCopyToOutputDirectoryItems", "GetTargetPath"}]" ToolPlatform="[MSBuildPlatform]" Verbosity="[Verbosity]" DeployOnBuild="[CreateWebDeployPackage]" DeployIisAppPath="[targetSite]" />
</Sequence>
</TryCatch.Try>
<TryCatch.Catches>
<Catch x:TypeArguments="s:Exception">
<ActivityAction x:TypeArguments="s:Exception">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="s:Exception" Name="ex" />
</ActivityAction.Argument>
<Sequence DisplayName="Handle Exception">
<Sequence.Variables>
<Variable x:TypeArguments="scg:ICollection(mtbc:IQueuedBuild)" Name="failedRequests" />
</Sequence.Variables>
<mtbwa:SetBuildProperties CompilationStatus="[Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Failed]" DisplayName="Set CompilationStatus to Failed" PropertiesToSet="CompilationStatus" mtbwt:BuildTrackingParticipant.Importance="Low" />
<If Condition="[CreateWorkItem]" DisplayName="If CreateWorkItem" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<mtbwa:InvokeForReason DisplayName="Create Work Item for non-Shelveset Builds" Reason="Manual, IndividualCI, BatchedCI, Schedule, ScheduleForced, UserCreated">
<mtbwa:OpenWorkItem AssignedTo="[BuildDetail.RequestedFor]" Comment="["This work item was created by TFS Build on a build failure."]" CustomFields="[New Dictionary(Of String, String) From { {"System.Reason", "Build Failure"}, {"Microsoft.VSTS.TCM.ReproSteps", "Start the build using TFS Build"}, {"Severity", "1 - Critical"} }]" DisplayName="Create Work Item" Title="[String.Format("Build Failure in Build: {0}", BuildDetail.BuildNumber)]" Type="["Bug"]" />
</mtbwa:InvokeForReason>
</If.Then>
</If>
<mtbwa:GetApprovedRequests DisplayName="Get Requests Approved for Check In" Result="[failedRequests]" mtbwt:BuildTrackingParticipant.Importance="None" />
<mtbwa:RetryRequests Behavior="[Microsoft.TeamFoundation.Build.Workflow.Activities.RetryBehavior.DoNotBatch]" DisplayName="Mark Requests for Retry" Requests="[failedRequests]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<Rethrow DisplayName="Rethrow the exception so the build will stop" mtbwt:BuildTrackingParticipant.Importance="Low" />
</Sequence>
</ActivityAction>
</Catch>
</TryCatch.Catches>
</TryCatch>
</If.Then>
</If>
<If Condition="[Not DisableTests]" DisplayName="If Not DisableTests" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<Sequence DisplayName="Run Tests" mtbwt:BuildTrackingParticipant.Importance="Low">
<If Condition="[Not TestSpecs Is Nothing]" DisplayName="If Not TestSpecs Is Nothing" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<ForEach x:TypeArguments="mtbwa:TestSpec" DisplayName="For Each TestSpec in TestSpecs" Values="[TestSpecs]" mtbwt:BuildTrackingParticipant.Importance="Low">
<ActivityAction x:TypeArguments="mtbwa:TestSpec">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="mtbwa:TestSpec" Name="spec" />
</ActivityAction.Argument>
<TryCatch DisplayName="Try Run Tests" mtbwt:BuildTrackingParticipant.Importance="Low">
<TryCatch.Try>
<If Condition="[TypeOf spec Is Microsoft.TeamFoundation.Build.Workflow.Activities.AgileTestPlatformSpec]" DisplayName="If spec Is AgileTestPlatformSpec" mtbwt:BuildTrackingParticipant.Importance="None">
<If.Then>
<Sequence DisplayName="Run Visual Studio Test Runner for Test Sources" mtbwt:BuildTrackingParticipant.Importance="Low">
<Sequence.Variables>
<Variable x:TypeArguments="mtbwa:AgileTestPlatformSpec" Name="agileTestPlatformAssembly" />
<Variable x:TypeArguments="scg:IEnumerable(x:String)" Name="agileTestPlatformAssemblies" />
</Sequence.Variables>
<Assign x:TypeArguments="mtbwa:AgileTestPlatformSpec" DisplayName="Assign spec to agileTestPlatformAssembly" To="[agileTestPlatformAssembly]" Value="[DirectCast(spec, Microsoft.TeamFoundation.Build.Workflow.Activities.AgileTestPlatformSpec)]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<mtbwa:FindMatchingFiles DisplayName="Find Visual Studio Test Platform Test Assemblies" MatchPattern="[String.Format("{0}\{1}", outputDirectory, agileTestPlatformAssembly.AssemblyFileSpec)]" Result="[agileTestPlatformAssemblies]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<If Condition="[agileTestPlatformAssemblies.Count() > 0]" DisplayName="If Visual Studio Test Platform Test Assemblies Found" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<If Condition="[agileTestPlatformAssembly.HasRunSettingsFile]" DisplayName="If agileTestPlatformAssembly.HasRunSettingsFile" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<Sequence DisplayName="Find Run Settings File And Run Visual Studio Test Runner" mtbwt:BuildTrackingParticipant.Importance="Low">
<Sequence.Variables>
<Variable x:TypeArguments="x:String" Name="localRunSettings" />
</Sequence.Variables>
<mtbwa:GenerateRunSettings DisplayName="Generate Run Settings File" RunSettingsForTestRun="[agileTestPlatformAssembly.RunSettingsForTestRun]" Result="[localRunSettings]" Workspace="[Workspace]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<mtbwa:RunTests DisplayName="Run Visual Studio Test Runner for Test Sources" RunName="[agileTestPlatformAssembly.RunName]" Flavor="[ConfigurationToBuild.Configuration]" Platform="[ConfigurationToBuild.Platform]" TestSources="[agileTestPlatformAssemblies]" RunSettings="[localRunSettings]" TestCaseFilter="[agileTestPlatformAssembly.TestCaseFilter]" ExecutionPlatform="[agileTestPlatformAssembly.ExecutionPlatform]" />
</Sequence>
</If.Then>
<If.Else>
<mtbwa:RunTests DisplayName="Run Visual Studio Test Runner for Test Sources" RunName="[agileTestPlatformAssembly.RunName]" Flavor="[ConfigurationToBuild.Configuration]" Platform="[ConfigurationToBuild.Platform]" TestSources="[agileTestPlatformAssemblies]" TestCaseFilter="[agileTestPlatformAssembly.TestCaseFilter]" ExecutionPlatform="[agileTestPlatformAssembly.ExecutionPlatform]" />
</If.Else>
</If>
</If.Then>
</If>
</Sequence>
</If.Then>
<If.Else>
<If Condition="[TypeOf spec Is Microsoft.TeamFoundation.Build.Workflow.Activities.TestMetadataFileSpec]" DisplayName="If spec Is TestMetadataFileSpec" mtbwt:BuildTrackingParticipant.Importance="None">
<If.Then>
<Sequence DisplayName="Run MSTest for Metadata File">
<Sequence.Variables>
<Variable x:TypeArguments="mtbwa:TestMetadataFileSpec" Name="testMetadataFile" />
<Variable x:TypeArguments="x:String" Name="localTestMetadata" />
</Sequence.Variables>
<Assign x:TypeArguments="mtbwa:TestMetadataFileSpec" DisplayName="Assign spec to testMetadataFile" To="[testMetadataFile]" Value="[DirectCast(spec, Microsoft.TeamFoundation.Build.Workflow.Activities.TestMetadataFileSpec)]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<mtbwa:ConvertWorkspaceItem DisplayName="Convert Server Path to Local Path" Input="[testMetadataFile.MetadataFileName]" Result="[localTestMetadata]" Workspace="[Workspace]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<mtbwa:MSTest RunTitle="[testMetadataFile.RunName]" Category="[testMetadataFile.CategoryFilter]" DisplayName="Run MSTest for Metadata File" Flavor="[ConfigurationToBuild.Configuration]" MaxPriority="[testMetadataFile.MaximumPriority]" MinPriority="[testMetadataFile.MinimumPriority]" PathToResultsFilesRoot="[TestResultsDirectory]" Platform="[ConfigurationToBuild.Platform]" SearchPathRoot="[outputDirectory]" TestLists="[testMetadataFile.TestLists]" TestMetadata="[localTestMetadata]" TestSettings="[String.Empty]" CommandLineArguments="[testMetadataFile.MSTestCommandLineArgs]" />
</Sequence>
</If.Then>
<If.Else>
<Sequence DisplayName="Run MSTest for Test Assemblies" mtbwt:BuildTrackingParticipant.Importance="Low">
<Sequence.Variables>
<Variable x:TypeArguments="mtbwa:TestAssemblySpec" Name="testAssembly" />
<Variable x:TypeArguments="scg:IEnumerable(x:String)" Name="testAssemblies" />
<Variable x:TypeArguments="x:String" Default="[String.Empty]" Name="testFlavor" />
<Variable x:TypeArguments="x:String" Default="[String.Empty]" Name="testPlatform" />
</Sequence.Variables>
<Assign x:TypeArguments="mtbwa:TestAssemblySpec" DisplayName="Assign spec to testAssembly" To="[testAssembly]" Value="[DirectCast(spec, Microsoft.TeamFoundation.Build.Workflow.Activities.TestAssemblySpec)]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<mtbwa:FindMatchingFiles DisplayName="Find Test Assemblies" MatchPattern="[String.Format("{0}\{1}", outputDirectory, testAssembly.AssemblyFileSpec)]" Result="[testAssemblies]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<If Condition="[testAssemblies.Count() > 0]" DisplayName="If Test Assemblies Found" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<If Condition="[testAssembly.HasTestSettingsFile]" DisplayName="If testAssembly.HasTestSettingsFile" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<Sequence DisplayName="Find Test Settings File And Run MSTest" mtbwt:BuildTrackingParticipant.Importance="Low">
<Sequence.Variables>
<Variable x:TypeArguments="x:String" Name="localTestSettings" />
</Sequence.Variables>
<mtbwa:ConvertWorkspaceItem DisplayName="Convert Server Path to Local Path" Input="[testAssembly.TestSettingsFileName]" Result="[localTestSettings]" Workspace="[Workspace]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<mtbwa:MSTest RunTitle="[testAssembly.RunName]" Category="[testAssembly.CategoryFilter]" DisplayName="Run MSTest for Test Assemblies" Flavor="[ConfigurationToBuild.Configuration]" MaxPriority="[testAssembly.MaximumPriority]" MinPriority="[testAssembly.MinimumPriority]" PathToResultsFilesRoot="[TestResultsDirectory]" Platform="[ConfigurationToBuild.Platform]" SearchPathRoot="[outputDirectory]" TestContainers="[testAssemblies]" TestSettings="[localTestSettings]" CommandLineArguments="[testAssembly.MSTestCommandLineArgs]" />
</Sequence>
</If.Then>
<If.Else>
<mtbwa:MSTest RunTitle="[testAssembly.RunName]" Category="[testAssembly.CategoryFilter]" DisplayName="Run MSTest for Test Assemblies" Flavor="[ConfigurationToBuild.Configuration]" MaxPriority="[testAssembly.MaximumPriority]" MinPriority="[testAssembly.MinimumPriority]" PathToResultsFilesRoot="[TestResultsDirectory]" Platform="[ConfigurationToBuild.Platform]" SearchPathRoot="[outputDirectory]" TestContainers="[testAssemblies]" CommandLineArguments="[testAssembly.MSTestCommandLineArgs]" />
</If.Else>
</If>
</If.Then>
</If>
</Sequence>
</If.Else>
</If>
</If.Else>
</If>
</TryCatch.Try>
<TryCatch.Catches>
<Catch x:TypeArguments="s:Exception">
<ActivityAction x:TypeArguments="s:Exception">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="s:Exception" Name="testException" />
</ActivityAction.Argument>
<Sequence DisplayName="Handle Test Run Exception">
<Sequence.Variables>
<Variable x:TypeArguments="scg:ICollection(mtbc:IQueuedBuild)" Name="failedRequests" />
</Sequence.Variables>
<If Condition="[Not (TypeOf testException Is Microsoft.TeamFoundation.Build.Workflow.Activities.TestFailureException)]" DisplayName="If testException is NOT TestFailureException" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<mtbwa:WriteBuildError DisplayName="Write Test Failure Message" Message="[testException.Message]" />
</If.Then>
</If>
<mtbwa:SetBuildProperties DisplayName="Set TestStatus to Failed" PropertiesToSet="TestStatus" TestStatus="[Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Failed]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<If Condition="[spec.FailBuildOnFailure]" DisplayName="If spec.FailBuildOnFailure" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<Assign x:TypeArguments="s:Boolean" DisplayName="Set treatTestFailureAsBuildFailure to True" To="[treatTestFailureAsBuildFailure]" Value="[True]" mtbwt:BuildTrackingParticipant.Importance="Low" />
</If.Then>
</If>
<mtbwa:GetApprovedRequests DisplayName="Get Requests Approved for Check In" Result="[failedRequests]" mtbwt:BuildTrackingParticipant.Importance="None" />
<mtbwa:RetryRequests Behavior="[Microsoft.TeamFoundation.Build.Workflow.Activities.RetryBehavior.DoNotBatch]" DisplayName="Mark Requests for Retry" Requests="[failedRequests]" mtbwt:BuildTrackingParticipant.Importance="Low" />
</Sequence>
</ActivityAction>
</Catch>
</TryCatch.Catches>
</TryCatch>
</ActivityAction>
</ForEach>
</If.Then>
</If>
</Sequence>
</If.Then>
</If>
<If Condition="[deployOutput]" DisplayName="Deploy Output" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<If Condition="[treatTestFailureAsBuildFailure And (BuildDetail.TestStatus = Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Failed)]" DisplayName="Deploy on Test Success" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<mtbwa:WriteBuildMessage DisplayName="Write Message" Message="Skipping Deployment Due to Test Failures." Importance="[Microsoft.TeamFoundation.Build.Client.BuildMessageImportance.Normal]" />
</If.Then>
<If.Else>
<If Condition="[Not azureWebSiteProfile Is Nothing]" DisplayName="Publish Output">
<If.Then>
<Sequence mtbwt:BuildTrackingParticipant.Importance="None">
<mtdwa:MSDeploy DisplayName="MSDeploy" BuildPath="[outputDirectory]" PublishEndpoint="[azureWebSiteProfile.PublishUrl]" TargetSite="[azureWebSiteProfile.MSDeploySite]" UserName="[azureWebSiteProfile.UserName]" Password="[azureWebSiteProfile.UserPWD]" AllowUntrustedCertificates="[AllowUntrustedCertificates]" />
<mtbwa:WriteCustomSummaryInformation DisplayName="Write Custom Deployment Summary" Message="[String.Format("Your Website was deployed to : [{0}]({0})",azureWebSiteProfile.DestinationAppUrl.ToString())]" SectionDisplayName="Deployment Summary" SectionKey="customSummarySectionKey" SectionPriority="160" />
<mtdwa:SetCurrentAzureWebsiteBuildNumber DisplayName="Set the current build number in the web site portal." ConnectedService="[deploymentEnvironment.ConnectedService]" AllowUntrustedCertificates="[AllowUntrustedCertificates]" WebsiteEnvironment="[deploymentEnvironment]" mtbwt:BuildTrackingParticipant.Importance="Normal" />
</Sequence>
</If.Then>
<If.Else>
<If Condition="[deploymentEnvironment.EnvironmentMetadata.Kind = Microsoft.TeamFoundation.Build.Client.DeploymentEnvironmentKind.AzureCloudApp]" DisplayName="DeploymentEnvironment is Azure Cloud Service" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<Sequence mtbwt:BuildTrackingParticipant.Importance="None">
<mtdwa:DeployAzureCloudApp DisplayName="Deploy application to Azure" ConnectedService="[deploymentEnvironment.ConnectedService]" DeploymentProfile="[azureCloudAppProfile]" AllowUntrustedCertificates="[AllowUntrustedCertificates]" BuildPath="[outputDirectory]" />
</Sequence>
</If.Then>
</If>
</If.Else>
</If>
</If.Else>
</If>
</If.Then>
</If>
</Sequence>
<If Condition="[BuildDetail.CompilationStatus = Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Unknown]" DisplayName="If CompilationStatus = Unknown" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<mtbwa:SetBuildProperties CompilationStatus="[Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Succeeded]" DisplayName="Set CompilationStatus to Succeeded" PropertiesToSet="CompilationStatus" mtbwt:BuildTrackingParticipant.Importance="Low" />
</If.Then>
</If>
<If Condition="[BuildDetail.TestStatus = Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Unknown]" DisplayName="If TestStatus = Unknown" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<mtbwa:SetBuildProperties DisplayName="Set TestStatus to Succeeded" PropertiesToSet="TestStatus" TestStatus="[Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Succeeded]" mtbwt:BuildTrackingParticipant.Importance="Low" />
</If.Then>
</If>
<If Condition="[treatTestFailureAsBuildFailure And (BuildDetail.TestStatus = Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Failed)]" DisplayName="If TreatTestFailureAsBuildFailure And (TestStatus = Failed)" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<mtbwa:SetBuildProperties DisplayName="Set Status to Failed" PropertiesToSet="Status" Status="[Microsoft.TeamFoundation.Build.Client.BuildStatus.Failed]" mtbwt:BuildTrackingParticipant.Importance="Low" />
</If.Then>
</If>
</Sequence>
</TryCatch.Try>
<TryCatch.Catches>
<Catch x:TypeArguments="s:Exception">
<ActivityAction x:TypeArguments="s:Exception">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="s:Exception" Name="compilationExceptionArgument" />
</ActivityAction.Argument>
<Assign x:TypeArguments="s:Exception" DisplayName="Save the Compilation Exception" To="[compilationException]" Value="[compilationExceptionArgument]" mtbwt:BuildTrackingParticipant.Importance="None" />
</ActivityAction>
</Catch>
</TryCatch.Catches>
</TryCatch>
<If Condition="[AssociateChangesetsAndWorkItems]" DisplayName="If AssociateChangesetsAndWorkItems" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<If Condition="[CreateLabel]" DisplayName="If CreateLabel and AssociateChangesetsAndWorkItems" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<mtbwa:InvokeForReason DisplayName="Associate Changesets and Work Items for non-Shelveset Builds" Reason="Manual, IndividualCI, BatchedCI, Schedule, ScheduleForced, UserCreated">
<mtbwa:AssociateChangesetsAndWorkItems DisplayName="Associate Changesets and Work Items" Result="[associatedChangesets]" />
</mtbwa:InvokeForReason>
</If.Then>
<If.Else>
<mtbwa:WriteBuildWarning DisplayName="Write Associate Changesets and Work Items Warning" Message="Cannot Associate Changesets and Work Items because the Label Sources option is set to False." />
</If.Else>
</If>
</If.Then>
</If>
</Parallel>
<If Condition="[Not compilationException Is Nothing]" DisplayName="If a Compilation Exception Occurred" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<Throw DisplayName="Rethrow Compilation Exception" Exception="[compilationException]" mtbwt:BuildTrackingParticipant.Importance="Low" />
</If.Then>
</If>
<Parallel DisplayName="Get Impacted Tests, Index Sources and Publish Symbols">
<If Condition="[PerformTestImpactAnalysis]" DisplayName="If PerformTestImpactAnalysis" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<Sequence DisplayName="Get Impacted Tests" mtbwt:BuildTrackingParticipant.Importance="Low">
<Sequence.Variables>
<Variable x:TypeArguments="scg:IEnumerable(x:String)" Name="assemblies" />
</Sequence.Variables>
<mtbwa:FindMatchingFiles DisplayName="Find Build Outputs" MatchPattern="[String.Format("{0}\**\*.dll;{0}\**\*.exe", BinariesDirectory)]" Result="[assemblies]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<mttbb:GetImpactedTests Assemblies="[assemblies]" AssociatedChangesets="[associatedChangesets]" BinariesRoot="[BinariesDirectory]" Build="[BuildDetail]" CodeChanges="{x:Null}" DisplayName="Get Impacted Tests" ImpactedTests="{x:Null}" Workspace="[Workspace]" />
</Sequence>
</If.Then>
</If>
<If Condition="[SourceAndSymbolServerSettings.IndexSources Or SourceAndSymbolServerSettings.HasSymbolStorePath]" DisplayName="If SourceAndSymbolServerSettings.IndexSources Or SourceAndSymbolServerSettings.HasSymbolStorePath" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<mtbwa:InvokeForReason DisplayName="Index Sources and Publish Symbols for Triggered Builds" Reason="Triggered">
<mtbwa:InvokeForReason.Variables>
<Variable x:TypeArguments="scg:IEnumerable(x:String)" Name="symbolFiles" />
</mtbwa:InvokeForReason.Variables>
<mtbwa:FindMatchingFiles DisplayName="Find Symbol Files" MatchPattern="[String.Format("{0}\**\*.pdb", BinariesDirectory)]" Result="[symbolFiles]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<If Condition="[SourceAndSymbolServerSettings.IndexSources]" DisplayName="If SourceAndSymbolServerSettings.IndexSources" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<TryCatch DisplayName="Try Index Sources" mtbwt:BuildTrackingParticipant.Importance="Low">
<TryCatch.Try>
<mtbwa:IndexSources DisplayName="Index Sources" FileList="[symbolFiles]" />
</TryCatch.Try>
<TryCatch.Catches>
<Catch x:TypeArguments="s:Exception">
<ActivityAction x:TypeArguments="s:Exception">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="s:Exception" Name="exception" />
</ActivityAction.Argument>
<mtbwa:WriteBuildError DisplayName="Write Indexing Sources Error" Message="[exception.Message]" />
</ActivityAction>
</Catch>
</TryCatch.Catches>
</TryCatch>
</If.Then>
</If>
<If Condition="[SourceAndSymbolServerSettings.HasSymbolStorePath]" DisplayName="If SourceAndSymbolServerSettings.HasSymbolStorePath" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<TryCatch DisplayName="Try Publish Symbols" mtbwt:BuildTrackingParticipant.Importance="Low">
<TryCatch.Try>
<mtbwa:SharedResourceScope DisplayName="Synchronize Access to Symbol Store" MaxExecutionTime="[TimeSpan.Zero]" MaxWaitTime="[New TimeSpan(1, 0, 0)]" ResourceName="[SourceAndSymbolServerSettings.SymbolStorePath]" mtbwt:BuildTrackingParticipant.Importance="Low">
<mtbwa:PublishSymbols DisplayName="Publish Symbols" FileList="[symbolFiles]" ProductName="[BuildDetail.BuildDefinition.Name]" StorePath="[SourceAndSymbolServerSettings.SymbolStorePath]" Version="[BuildDetail.BuildNumber]" />
</mtbwa:SharedResourceScope>
</TryCatch.Try>
<TryCatch.Catches>
<Catch x:TypeArguments="s:Exception">
<ActivityAction x:TypeArguments="s:Exception">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="s:Exception" Name="exception" />
</ActivityAction.Argument>
<mtbwa:WriteBuildError DisplayName="Write Publishing Symbols Error" Message="[exception.Message]" />
</ActivityAction>
</Catch>
</TryCatch.Catches>
</TryCatch>
</If.Then>
</If>
</mtbwa:InvokeForReason>
</If.Then>
</If>
</Parallel>
</Sequence>
</TryCatch.Try>
</TryCatch>
</mtbwa:AgentScope>
<mtbwa:InvokeForReason DisplayName="Check In Gated Changes for CheckInShelveset Builds" Reason="CheckInShelveset">
<mtbwa:CheckInGatedChanges DisplayName="Check In Gated Changes" />
</mtbwa:InvokeForReason>
</Sequence>
</Activity>