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?

Arash
  • 3,628
  • 5
  • 46
  • 70

3 Answers3

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.

JohanSellberg
  • 2,423
  • 1
  • 21
  • 28
  • 3
    This is the correct answer now if you want to continue using the hosted build agent. – Darthg8r Apr 04 '17 at 21:35
  • 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? – Piotr Kula Jul 24 '17 at 13:12
  • 1
    For those who struggle to find where this is, it's under the 'Process' option on the tasks tab above the list of tasks – Dreagen Sep 12 '17 at 15:01
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.

Tingting0929
  • 4,142
  • 1
  • 14
  • 14
  • 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. – Arash Jan 21 '17 at 15:04
  • @Arash I think I misunderstood your issues, I have edited my reply. – Tingting0929 Jan 23 '17 at 01:35
  • 1
    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="http://schemas.microsoft.com/developer/msbuild/2003" to the element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format. – ZeroOne Jan 23 '17 at 04:02
  • @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. – Arash Jan 26 '17 at 02:11
  • @Arash Thanks for your information and it seems that you're using the Host build agent in VSTS. I have updated my reply again. – Tingting0929 Jan 26 '17 at 02:25
  • @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. – Arash Jan 26 '17 at 20:08
  • 1
    @Arash 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! – Tingting0929 Jan 27 '17 at 01:40
  • Basically we have to wait for the VSTS to put it on the hosted agent? – Dan Parker Mar 08 '17 at 20:53
  • @DanParker I asked the question of when this will happen, here: http://stackoverflow.com/questions/42740312/azure-hosted-agents-visual-studio-2017 – Calum Mar 16 '17 at 10:33
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

Thinira
  • 361
  • 3
  • 8
  • 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". – Brian Cryer Aug 21 '19 at 10:59