.NET Core 2.2 has been release for couple of weeks. However, the build pipeline is still failing these days. Microsoft has not installed .NET Core 2.2 SDK to the hosted VS2017 agents yet. Let's see how to work around this issue and have a success build for our .NET Core 2.2 apps.
1. Add Task
Edit your build definition, and click the "+" button to add a new task.
2. Add .NET Core SDK Installer
Find the ".NET Core SDK Installer" task in the gallery and click "Add" button.
3. Task Order
Move the ".NET Core SDK Installer" task to the first step of your build pipeline.
4. Edit Task
Set the Version field to "2.2.100", and I recommend to change the "Display name" field to match the version also.
5. Save & queue
Now you will have a sucessful build of your .NET Core 2.2 project.
If you want to check the logs for what magic has happend, just click on the task, you can see the install log for the .NET Core 2.2 SDK.
Hope this post can help you out, and have a nice build!
Thanks for this very helpful!
Should you remove this build step once it builds to save time for future builds?
Thanks !!! it helped me a lot.
This page content is good, but needs update. There is no task for ".NET core sdk installer" any more. Instead there is a "Use .NET core sdk" task under tools, which should be used to install a specific version of dotnet core sdk for the project build. See: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/tool/dotnet-core-tool-installer?view=azure-devops