0
votes

I have defined an MSbuild project for build a .Net Solution developed with VS 2015 Enterprise. The Tfs Build Server is TFS 2013, i have installed on the server the VS 2015 Enterprise. I specified the MSBuild version i want to use on the Build process setting on the Build definition the parameters: /tv:14.0 and /p:ValidateArchitecture=true on the following order:

MSBuild Arguments: /p:ValidateArchitecture=true /tv:14.0

I have Modeling project on my solution that i want to validate on Build time at TFS Build process. The fact is that when the validation process start it fails, and i see that the Visual Studio version is used for that is v11.0 instead of v14.0 . How can i force TFS to use the v14.0 for validation modeling project at Build process:

Here you can see the Build log of the process:

ValidateArchitecture_GenerateDgmlForLayers:
Processing      
E:\...Project Source\XXXPPP\Arch.layerdiagram...
-query obj\Release\Arch.layerdiagram.dgql -output     
obj\Release\Arch.layerdiagram.dgml -format SimplifiedDgml -uiculture     
en-US -exceptions 
C:\Program Files   
(x86)\MSBuild\Microsoft\VisualStudio\ **v11.0** \ArchitectureTools\
Microsoft.VisualStudio.TeamArchitect.LayerDesigner.targets(148,5): error  
MSB4018: The "GraphCmd" task failed unexpectedly.   
[Drive:\Comp\3\Project Source\XXXPPP\Arch.modelproj]

As you can see, the validation process is using v11.0 version, i have in the MSBuild TFS Path the v14.0, how to use this last version for validation process??.

Thanks in advance.

1
Is the "GraphCmd" task a custom build activity?Tingting0929

1 Answers

2
votes

It seems that you are using the old build template not the default template for TFS 2013. You could edit your build process template and set the ToolPath property of the MSBuild activity to "C:\Program Files (x86)\MSBuild\14.0\Bin". For more details, you could refer to this blog: Update MSBuild Toolpath in TFS build process template

If you don't find the ToolPath property and the MSBuild activity but an activity named "Run MSBuild", find the MSBuild activity and replace the "RunMSBuild activity". Then set the Toolpath property.

Here are some other that may help you: TFSBuild 2013 unable to change msbuild version

Update Build Controller/Agents to build C# 6 /.NET 4.6 application