So I am going to ask my original question, but then answer it because I found a solution.
Since I recently upgraded my dev box from VS 2015 to VS 2015 Update 1, my custom XAML template encountered an error that I didn't seem to cause. I was wondering why?
The build exception most may be seeing and I saw: Cannot set unknown member 'Microsoft.TeamFoundation.Build.Activities.RunScript.FailOnNonZeroExitCode'(type XamlObjectWriterException)
Turns out Microsoft made some sort of schema change in VS 2015 update 1 that adds a property to what I experienced as 4 lines in the XAML that will break the automatic build templates if running a VS 2015 build controller and agent(s). Not sure if the build controller can be updated yet to match, but here is what I found in the two XAMLs:
Good with no extra property:
<mtba:RunScript Arguments="[AdvancedBuildSettings.GetValue(Of String)("PreActionScriptArguments", String.Empty)]" DisplayName="Run optional script before MSBuild" Enabled="True" FilePath="[AdvancedBuildSettings.GetValue(Of String)("PreActionScriptPath", String.Empty)]" sap2010:WorkflowViewState.IdRef="RunScript_1" />
<mtba:RunScript Arguments="[AdvancedBuildSettings.GetValue(Of String)("PostActionScriptArguments", String.Empty)]" DisplayName="Run optional script after MSBuild" Enabled="True" FilePath="[AdvancedBuildSettings.GetValue(Of String)("PostActionScriptPath", String.Empty)]" sap2010:WorkflowViewState.IdRef="RunScript_2" />
<mtba:RunScript Arguments="[AdvancedTestSettings.GetValue(Of String)("PreActionScriptArguments", String.Empty)]" DisplayName="Run optional script before Test Runner" Enabled="True" FilePath="[AdvancedTestSettings.GetValue(Of String)("PreActionScriptPath", String.Empty)]" sap2010:WorkflowViewState.IdRef="RunScript_3" />
<mtba:RunScript Arguments="[AdvancedTestSettings.GetValue(Of String)("PostActionScriptArguments", String.Empty)]" DisplayName="Run optional script after Test Runner" Enabled="True" FilePath="[AdvancedTestSettings.GetValue(Of String)("PostActionScriptPath", String.Empty)]" sap2010:WorkflowViewState.IdRef="RunScript_4" />
Changed schema using Update 1 (same 4 lines of code):
<mtba:RunScript Arguments="[AdvancedBuildSettings.GetValue(Of String)("PreActionScriptArguments", String.Empty)]" DisplayName="Run optional script before MSBuild" Enabled="True" FailOnNonZeroExitCode="True" FilePath="[AdvancedBuildSettings.GetValue(Of String)("PreActionScriptPath", String.Empty)]" sap2010:WorkflowViewState.IdRef="RunScript_1" />
<mtba:RunScript Arguments="[AdvancedBuildSettings.GetValue(Of String)("PostActionScriptArguments", String.Empty)]" DisplayName="Run optional script after MSBuild" Enabled="True" FailOnNonZeroExitCode="True" FilePath="[AdvancedBuildSettings.GetValue(Of String)("PostActionScriptPath", String.Empty)]" sap2010:WorkflowViewState.IdRef="RunScript_2" />
<mtba:RunScript Arguments="[AdvancedTestSettings.GetValue(Of String)("PreActionScriptArguments", String.Empty)]" DisplayName="Run optional script before Test Runner" Enabled="True" FailOnNonZeroExitCode="True" FilePath="[AdvancedTestSettings.GetValue(Of String)("PreActionScriptPath", String.Empty)]" sap2010:WorkflowViewState.IdRef="RunScript_3" />
<mtba:RunScript Arguments="[AdvancedTestSettings.GetValue(Of String)("PostActionScriptArguments", String.Empty)]" DisplayName="Run optional script after Test Runner" Enabled="True" FailOnNonZeroExitCode="True" FilePath="[AdvancedTestSettings.GetValue(Of String)("PostActionScriptPath", String.Empty)]" sap2010:WorkflowViewState.IdRef="RunScript_4" />
Workaround/hack if you don't/can't update build controller:
I will be testing to see if I can update our build controller to update 1 to see if it permanently fixes this issue and post back.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With