TFS Build 2013 - using Visual Studio 2015

2019-02-21 05:29发布

I have been having a bit of trouble getting Build on TFS 2013 to work when using Visual Studio 2015 for the checking in of files. The solution/project that I am working on was created on VS 2015 (.NET 4.6) and I seem to be having troubles building it on my TFS 2013.

I was firstly getting an error:

Confirm that the path in the declaration is correct, and that the file exists on disk

But I seem to have overcome this by adding:

/p:VisualStudioVersion=14.0

against the MSBuild Agent. That overcome I then try to build a check in (from VS 2015) and I now get the error:

TF900547: The directory containing the assemblies for the Visual Studio Test Runner is not valid 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow'.

This is suggesting that there is still a reference to the older version of VS for the TestWindow (i.e. 12.0) instead of looking in the folder

Visual Studio 14.0

Which is where I would want it to point.

I have Visual Studio 2015 installed on the same machine as TFS so everything is there - but in the respective 14.0 folders where TFS keeps going to look in 12.0

Am I missing an obvious trick with regards to how I have all this setup or do I just keep having to plug at these issues as they come up?

Obviously I would like to get TFS 2015 setup to use alongside VS 2015 developments but that is a little wile off yet.

Thanks!

2条回答
SAY GOODBYE
2楼-- · 2019-02-21 05:37

Many other community members have the similar issue, the /p:VisualStudioVersion=14.0 argument doesn't work. You can follow below steps and retry it.

1.Customize the tfs build process template to set ToolPath of the Run MSBuild for Project to target to MSBuild14; and set ToolVersion to "14.0".

2.Check in this build process template and re-queue the build

For detail and screenshot you can reference this link : BuildActivity ignores ToolsVersion

查看更多
\"骚年 ilove
3楼-- · 2019-02-21 05:47

I ended up starting from scratch but this time installing VS 2013 alongside the 2013 TFS installation. Since then all seems fine and building well!

查看更多
登录 后发表回答