title: How to build a .NET 5 Azure Function on Azure DevOps?
body: <p>I'm trying to make a build pipeline with the yml editor for a .NET 5 Isolated Process Azure Function. My steps look as follows:</p>
  <pre><code>steps:
    - task: NugetToolInstaller@1
      displayName: 'NuGet Installer'
      inputs:
        versionSpec: $(NuGetVersion)
  
    - task: UseDotNet@2
      displayName: 'Using .NET $(NetVersion)'
      inputs:
        packageType: 'sdk'
        version: $(NetVersion)
  
    - task: DotNetCoreCLI@2
      displayName: 'Building Solution'
      inputs:
        command: 'build'
        arguments: '--configuration $(BuildConfiguration)'
        projects: '$(Solution)'
  
    - task: DotNetCoreCLI@2
      displayName: 'Publish Function'
      inputs:
        command: 'publish'
        publishWebProjects: true
        arguments: '--output $(Build.ArtifactStagingDirectory) -c $(BuildConfiguration)'
        modifyOutputPath: false
  </code></pre>
  <p>When I get to the Build Solution step, it fails for the following reasons:</p>
  <pre><code>C:\SomeDirectory\.nuget\packages\microsoft.net.sdk.functions\3.0.11\build\Microsoft.NET.Sdk.Functions.Build.targets(32,5): Error : It was not possible to find any compatible framework version.
  
  The framework 'Microsoft.NETCore.App', version '3.1.0' was not found.
      The following frameworks were found:
          5.0.10 at [C:\somedirectory\]. 
      You can resolve the problem by installing the specified framework and/or SDK.
  </code></pre>
  <p>It then proceeds to link the .NET Core 3.1 Runtime. I'm not sure why this is the case. The .csproj has .NET 5 specified as well as the .sln file. I've tried building with both the .sln file and the .csproj file. I don't have .NET Core 3.1 specified anywhere, and the related NuGet packages are all up to date.</p>
  <p>Is there a certain step I have to use or some variable I have to specify for this to work?</p>