skip to Main Content

Azure build pipeline fails as the .NET Core 3.1 version is deprecated in the VM image.

I have a large Azure Function app. Upgrading the project is not an option at the moment.

The below link has a list of available VM images.

https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&tabs=yaml

All of them have the announcement saying the .NET Core 3.1 is deprecated.

enter image description here

What are the solutions I can take without upgrading the framework of the project?

2

Answers


  1. Chosen as BEST ANSWER

    As @Silvan correctly pointed out, we can specify the .NET Core version in the yml file.

      - task: UseDotNet@2
      displayName: ".NET Core 3.1.x"
      inputs:
         version: "3.1.x"
         packageType: sdk
    

  2. If you are using the YAML pipeline, you can specify the version of the .NET Core SDK directly in your pipeline configuration. This allows you to pin the SDK version to the one you require, regardless of the VM image used. Here’s an example of how you can set the .NET Core SDK version in your pipeline:

    yaml

    steps:
    - task: UseDotNet@2
      inputs:
        version: 3.1.x
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search