Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WorkerExtensions.csproj : Target framework is set to .Net6 Even if functions are configured to target Net8 #2302

Closed
mahrezTaharboucht opened this issue Feb 26, 2024 · 1 comment

Comments

@mahrezTaharboucht
Copy link

Description

We tried to migrate our Azure functions from .net6 to .net8 but we discovered that the autogenerated project "WorkerExtensions" is always targeting .net6.
Is it possible to change the target framework to .Net8 ?

Involved source code :
https://github.com/Azure/azure-functions-dotnet-worker/blob/main/sdk/Sdk/ExtensionsCsprojGenerator.cs
ligne (63)

Steps to reproduce

  • Create a .net 8 Azure function (isolated process).
  • Build the function in an AzureDevops pipeline using the "UseDotNet@2" task to setup the .net8 runtime in the temp build directory. (the build agent should not have Net6 or Net8 installed globally)
  • The pipeline should fail when trying to build the WorkerExtensions project.
@kshyju
Copy link
Member

kshyju commented Feb 28, 2024

The build/publish output of the auto generated WorkerExtensions project is indirectly used by the functions host runtime. As of today, the V4 runtime is built on .NET6. This means, we need to make sure that your build/CI environment has .NET6, so that it can build & produce the binaries which are compatible with the host runtime.

A few new improvements are coming to this area in the near future, which will allow you to remove this .NET6 requirement. No ETA to share at this point though.

@kshyju kshyju removed bug Something isn't working Needs: Triage (Functions) labels Feb 28, 2024
@kshyju kshyju closed this as completed Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants