CompositionalIT / farmer

Repeatable Azure deployments with ARM templates - made easy!
https://compositionalit.github.io/farmer
MIT License
517 stars 156 forks source link

netFrameworkVersion not output for Functions? #1051

Closed BrianVallelunga closed 11 months ago

BrianVallelunga commented 1 year ago

Is there a reason the netFrameworkVersion is not set for Azure Functions? The Linux versions are set, but the code here just sets the output to None (line 332):

https://github.com/CompositionalIT/farmer/blob/2c00e369180ae60cd2c56397cb1b9052869179b9/src/Farmer/Builders/Builders.Functions.fs#L320-L337

For me, this shows in the UI of my function as .NET 4.8 as a default. If I manually set the value and export the template, I do get the expected output in the ARM template: "netFrameworkVersion": "v7.0"

If this value should be set, I can work on a pull request.

martinbryant commented 1 year ago

From what I understand the only netFrameworkVersion supported by Azure Function is 4.8 - details can be found in the docs

BrianVallelunga commented 12 months ago

I see the confusion. Yes, only the .NET Framework 4.8 is supported by by Azure Functions. However, that ARM field refers to the stack's .NET version configured for the function app. It's options are shown on the General settings here:

image

Right now, valid values are "v4.8", "v6.0", and "v7.0". When it is not set, the UI defaults to 4.8, which is going to be wrong for most people.

BrianVallelunga commented 11 months ago

Thanks!