0
votes

I have a build pipeline in Azure DevOps which has the following tasks and uses a hosted agent.

enter image description here

Now, when I run it the Test task fails with the following message.

Testhost process exited with error: It was not possible to find any compatible framework version
The framework 'Microsoft.AspNetCore.App', version '2.2.0' was not found.

How can I install version 2.2.0 in the hosted agent?

1

1 Answers

0
votes

You can add a “Use .NET Core” task and specify version of .NET Core SDK or runtime to install. Here is a sample:

- task: UseDotNet@2
  displayName: 'Use .NET Core runtime 2.2.0'
  inputs:
    packageType: runtime
    version: 2.2.0

In addition,we have deprecated .NET Core 2.2 on 19 June for Windows, Ubuntu and macOS images. This change is because 2.2 version of .NET Core has been deprecated in January, 2020. As we try only to keep the versions which are not End Of Line (2.1, 3.0 and 3.1). You can find more detailed information in this ticket: https://github.com/actions/virtual-environments/issues/975 .