1

I already have a build pipeline for an existing project. I tried to change to project to <LangVersion>10</LangVersion>. Now the build pipeline fails, because it says, 10 is not allowed.

I already installed Build Tools 2022, but it still didn't work. When I open the pipeline to change the MSBuild or Visual Studio version to be used in the build task, I can only select versions up to 2019 or latest (I picked latest here).

The Build Tools 2019 are still installed (I don't wanted to risk, other pipelines to fail because of the update). So maybe the Build agent just takes the wrong MSBuild version? Maybe I have to update the Build Agent itself? (It doesn't work automatically, because of our company firewall, I would have to copy the newer version to the server for deployment.)

Can anyone tell me, what the official way is, to get this to work. My google search didn't give me usable results.

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
Martini Bianco
  • 1,484
  • 1
  • 13
  • 23
  • 1
    See: https://stackoverflow.com/questions/69980204/how-do-i-update-my-azure-devops-on-premise-pipeline-tasks-to-include-msbuild-v17 – jessehouwing Jan 07 '22 at 21:59
  • I can't build the tasks (probably my company firewall). Any chance to download the tasks without having access to an cloud-hosted Azure-Devops? – Martini Bianco Feb 07 '22 at 12:41
  • Safest bet is to download them straight from any azure DevOps organization, can even be a temporary one created under a personal account). I could offer zip files, nut can't guarantee the contents of those zips. I wouldn't trust that personally. You either need to build the tasks (possibly on one of your own build servers?), Or download them. – jessehouwing Feb 07 '22 at 13:25
  • In case you do trust my scripting capabilities, here is a repo that automatically downloads the latest snapshots of all tasks. There is a verbatim release as well as one that patches each task so it can be installed side-by-side (sxs) of the original task. https://github.com/jessehouwing/azure-pipelines-tasks-zips/releases – jessehouwing Feb 07 '22 at 23:08
  • Thanks a lot, I will try that. – Martini Bianco Feb 08 '22 at 22:37
  • Does this answer your question? [How do I update my Azure DevOps on-premise Pipeline tasks to include MSBuild v17 and Visual Studio 2022?](https://stackoverflow.com/questions/69980204/how-do-i-update-my-azure-devops-on-premise-pipeline-tasks-to-include-msbuild-v17) – jessehouwing Mar 13 '22 at 08:34

1 Answers1

0

You should read on Mircosoft's devblog arcticle MSBuild and 64-bit Visual Studio 2022

and check on github example

hoangsnowy
  • 256
  • 1
  • 4
  • If I understand that correctly, I must change all yaml files for this to work? That doesn't sound right! Are you sure, there is no clean way to do that? – Martini Bianco Feb 05 '22 at 16:49
  • Also, hasn#t worked. - For completeness: I change version to 17 and msbuildArchitecture to x64. But Agent still didn't found the msbuild verison. – Martini Bianco Feb 05 '22 at 16:52