azure-functions-core-tools icon indicating copy to clipboard operation
azure-functions-core-tools copied to clipboard

Update linuxFxVersion for publishing .NET 7 applications

Open michaelpeng36 opened this issue 3 years ago • 0 comments

Issue describing the changes in this PR

Currently, Core Tools V4 ensures the linuxFxVersion setting remains empty for Linux Consumption applications, updating it only for other SKUs. However, with .NET 7 function apps on Linux, we rely on setting the value to DOTNET-ISOLATED|7.0. This PR:

  1. Updates the linuxFxVersion setting for Linux Consumption publishing.
  2. Automatically detects the target framework version for .NET isolated function apps by parsing the .csproj file.

Pull request checklist

  • [x] My changes do not require documentation changes
    • [ ] Otherwise: Documentation issue linked to PR
  • [x] My changes do not need to be backported to a previous version
    • [ ] Otherwise: Backport tracked by issue/PR #issue_or_pr
  • [x] I have added all required tests (Unit tests, E2E tests)

michaelpeng36 avatar Aug 17 '22 14:08 michaelpeng36