Azure / azure-functions-vs-build-sdk

MSBuild task for Azure Functions
MIT License
99 stars 66 forks source link

GitHub Actions: Metadata generation failed when building Azure Functions in .NET5.0 #486

Closed kuromukira closed 3 years ago

kuromukira commented 3 years ago

I tried migrating my .NET Core 3.1 Azure Functions to .NET 5.0. When running GitHub actions, I'm getting this error

microsoft.net.sdk.functions/3.0.11/build/Microsoft.NET.Sdk.Functions.Build.targets(32,5): error : - https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=3.1.0&arch=x64&rid=ubuntu.20.04-x64

I think this should be getting the runtime version for .NET 5.0 and not 3.1. Right?

kuromukira commented 3 years ago

Hmm. I made it pass GitHub Actions when I added a side-by-side dotnet sdk

on: push
name: dotnet-ci

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - name: Setup .NET Core SDK 3.1.x
        uses: actions/setup-dotnet@v1
        with:
          dotnet-version: 3.1.x
      - name: Setup .NET Core SDK 5.0.x
        uses: actions/setup-dotnet@v1
        with:
          dotnet-version: 5.0.x
      - name: Build
        working-directory: ./functions/
        run: dotnet build
kuromukira commented 3 years ago

Closing this as I have read that Azure Functions does not support .NET5.0 yet.