Visual Studio 2017 online build agent fails due to inability to find Visual Studio Version 15.0
Asked Answered
A

3

28

I created a CI/CD pipeline by utilized Visual Studio 2017 build agent available on VSTS online but it fails due to the warning message below:

"Visual Studio version '15.0' not found. Looking for the latest version.

So, the agent starts using version 14.0 which is VS 2015. Is there a workaround to address this?

Alroi answered 19/1, 2017 at 15:13 Comment(1)
Are you using hosted build agent? If not, can you share a screenshot for your build agent capabilities?Interact
S
35

There is now a hosted 2017 option that are able to build the 2017 (Visual Studio version '15.0') projects.

enter image description here

Change to that and you should be all set.

Shalne answered 24/3, 2017 at 8:24 Comment(3)
This is the correct answer now if you want to continue using the hosted build agent.Capers
So all that is, is that Visual Studio 2017 is installed on the machine? So all I have to do for my local machine is install VS2017?Defector
For those who struggle to find where this is, it's under the 'Process' option on the tasks tab above the list of tasksKid
J
4

You need to install VS 2017 on your build agent.

Your project in created from VS 2017 and you want to build it in VSTS. Your build agent is using VS 2015 and it seems that you choose VS 2017 to build your project in the build definition, so during the build, it will try to find VS 2017(15.0) on build agent.

Update:

If you're using the Host Agent in VSTS. This build agent is not support to install something on it. And according to this document, this build agent doesn't have VS 2017 installed on it currently. You could configure your build agent at your local machine and install VS 2017 on the local machine.

Jinnyjinrikisha answered 20/1, 2017 at 5:46 Comment(9)
I am not using VS 2015! That's the exact issue. The solution/project was created in Visual Studio 2017 RC, hence I had to choose Visual Studio 2017 from that dropdown list. I cannot and should not be selecting VS 2015.Alroi
@Alroi I think I misunderstood your issues, I have edited my reply.Jinnyjinrikisha
I am getting a similar problem which I think it related: VSTS (online, not TFS) is failing at the build SLN stage with the following error: ##[error]Web1\Web1.csproj(1,1): Error MSB4041: The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="schemas.microsoft.com/developer/msbuild/2003" to the <Project> element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format.Zoster
@Tingting0929-MSFT how can I install VS 2017 on my VSTS online build agent? Do I have permission or there is a way to do so? VS 2017 is already available through the dropdown list.Alroi
@Alroi Thanks for your information and it seems that you're using the Host build agent in VSTS. I have updated my reply again.Jinnyjinrikisha
@Tingting0929-MSFT I installed a dedicated TFS VS 2017 on a server but it manifests many issues in compiling .net standard 1.6 and .net core. I opened a ticket with the community and Chris and the team are looking into it. Question: if TFS does not support VS 2017, why VS 2017 is an option in the build agent dropdown list? Thanks.Alroi
@Alroi VSTS supports VS 2017 RC, but the Host Agent doesn't have VS 2017 installed on it. Maybe the VS 2017 RTM released, it will added to the Host agent. Now, you could configure a new Vnext build agent on your own machine for your VSTS and install VS 2017 RC on it. Thanks!Jinnyjinrikisha
Basically we have to wait for the VSTS to put it on the hosted agent?Loudmouthed
@DanParker I asked the question of when this will happen, here: #42740812Mauritamauritania
M
3

If you are using "Visual Studio Test" task in your release pipeline, Please select "Installed by tools installer" as "Test platform version"

enter image description here

Marlite answered 14/11, 2018 at 12:4 Comment(1)
Excellent answer and selecting "Installed by Tools Installer" solved the problem for me. Two observations that might help others: 1. You do need the task "Visual Studio Test Platform Installer" (which is shown in the screen shot) and 2. "Selenium Automation" is an edited name, the default (for me at least) is "Test Assemblies".Manslaughter

© 2022 - 2024 — McMap. All rights reserved.