Azure DevOps: What do I need to build .Net 6 solutions?

Viewed 248

We have an on-premises Azure DevOps 2019 server, with build pipelines for numerous .Net 4.x solutions that our small team maintains using VS2019.

The team is about to upgrade to VS2022, and at some point I would like to migrate some solutions to .Net 6. Can DevOps 2019 build .Net 6 solutions, and if so what changes are needed to support this (such as presumably installing VS2022 on the server)?

Will those solutions' build pipelines require any changes or should they continue to work as-is? They don't contain anything too clever, with steps such as: NuGet restore, build solution, run unit tests, NuGet pack & push. (The build pipelines are managed via the web GUI, not YAML, if that makes a difference).

Some solutions will remain .Net 4.x, so the server will still need to support (build) these.

1 Answers

You should just need two things:

  1. First you have to install the corresponding SDK for building the apps (see sdk download - Build apps - SDK) on your build-agents.
  2. (Optional) Add or modify your set SDK Task in your pipelines (see use dotnet core task).

One more hint, you don't need to install a whole VS on the server. The Build-Tools are enough (VS2022 Buildtools preview).

Related