Had a strange issue today while editing our standard TFS 2013 XAML build process template to add an optional post drop script block to allow a Release Management pipeline to be triggered via REST. Our standard template includes a block for enabling and disabling Typemock, after editing our template to add the new script block (nowhere near the Typemock section) our builds failed with the error
TF215097: An error occurred while initializing a build for build definition BMISS.Expenses.Main.CI: Exception Message: Cannot set unknown member 'TypeMock.TFS2013.TypeMockStart.DisableAutoLink'. (type XamlObjectWriterException) Exception Stack Trace: at System.Xaml.XamlObjectWriter.WriteStartMember(XamlMember property)
It took ages to find the issue, we hunted for badly formed XAML, but the issue turned out to be that when ever we opened the template in Visual Studio 2013 it added the highlighted property
<If Condition="\[UseTypemock = True\]" DisplayName="If using Typemock" sap2010:WorkflowViewState.IdRef="If\_8">
<If.Then>
<Sequence DisplayName="Enabling Typemock" sap2010:WorkflowViewState.IdRef="Sequence\_16">
<tt:TypeMockRegister AutoDeployDir="\[TypemockAutoDeployDir\]" Company="\[TypemockCompany\]" sap2010:WorkflowViewState.IdRef="TypeMockRegister\_1" License="\[TypemockLicense\]" />
<tt:TypeMockStart DisableAutoLink="{x:Null}" EvaluationFolder="{x:Null}" Link="{x:Null}" LogLevel="{x:Null}" LogPath="{x:Null}" ProfilerLaunchedFirst="{x:Null}" Target="{x:Null}" Verbosity="{x:Null}" Version="{x:Null}" AutoDeployDir="\[TypemockAutoDeployDir\]" sap2010:WorkflowViewState.IdRef="TypeMockStart\_1" />
</Sequence>
</If.Then>
</If>
It should have been
<If Condition="\[UseTypemock = True\]" DisplayName="If using Typemock" sap2010:WorkflowViewState.IdRef="If\_8">
<If.Then>
<Sequence DisplayName="Enabling Typemock" sap2010:WorkflowViewState.IdRef="Sequence\_16">
<tt:TypeMockRegister AutoDeployDir="\[TypemockAutoDeployDir\]" Company="\[TypemockCompany\]" sap2010:WorkflowViewState.IdRef="TypeMockRegister\_1" License="\[TypemockLicense\]" />
<tt:TypeMockStart EvaluationFolder="{x:Null}" Link="{x:Null}" LogLevel="{x:Null}" LogPath="{x:Null}" ProfilerLaunchedFirst="{x:Null}" Target="{x:Null}" Verbosity="{x:Null}" Version="{x:Null}" AutoDeployDir="\[TypemockAutoDeployDir\]" sap2010:WorkflowViewState.IdRef="TypeMockStart\_1" />
</Sequence>
</If.Then>
</If>
All I can assume is that this is due to some assembly mismatch between the Typemock DLLs linked to the XAML build process template and those on my development PC.
The fix for now is to do the editing in a text editor, or at least checking the file to make sure the property has not been edited before it is checked in.