Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

netFrameworkVersion in Azure App Services Api App

I'm configuring a api app in azure with bicep. This is a dotnet core 3.1 app. For netFrameworkVersion i provide 'v3.1', this however doesn't work. The deployment of the Bicep template does work, but my application does not. The value of .NET version is empty in the portal. enter image description here

When i manually change the version in the portal, and do an export of my app, the returned ARM template is sets netFrameworkVersion to 'v4.0'. I am very confused, what is happening here? I can't seem to find any documentation about this.
enter image description here

enter image description here

like image 956
Amateur Avatar asked Jul 24 '26 01:07

Amateur


1 Answers

You need to specify the CURRENT_STACK metadata and the netFrameworkVersion property inside the siteConfig section:

resource webapp 'Microsoft.Web/sites@2018-11-01' = {
  ...
  properties: {
    ...
    siteConfig: {
      ...
      netFrameworkVersion: 'v6.0'
      metadata: [
        {
          name: 'CURRENT_STACK'
          value: 'dotnet'
        }
      ]
      ...
    }
    ...
  }
}
like image 192
Thomas Avatar answered Jul 26 '26 16:07

Thomas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!