Search code examples
azure-web-app-serviceazure-resource-managerazure-bicep.net-7.0

Deploying an Azure Web App via Bicep does not set Stack


I am creating an Azure Web App via Bicep to host an ASP.NET Core 7.0 Website. My Bicep contains:

    netFrameworkVersion:  'v7.0'
    requestTracingEnabled: true
    remoteDebuggingEnabled: true
    remoteDebuggingVersion: 'VS2022'
    httpLoggingEnabled: true
    use32BitWorkerProcess: false
    ftpsState: 'FtpsOnly'
    managedPipelineMode: 'Integrated'

But when I deploy the Bicep it is not being set to .NET 7 and the settings look like below:

enter image description here

I found some posts on SO that suggests some solution for metadata but I am not sure how and if this solution apply to .NET 7.

Are you aware of any missing setting that I need to add to have this set to the picture below:

enter image description here


Solution

  • If you want to deploy Linux web app, use linuxFxVersion parameter:

    linuxFxVersion: 'DOTNETCORE|7.0'
    

    For windows deployment, use the following parameters:

    metadata :[
            {
              name:'CURRENT_STACK'
              value:'dotnet'
            }
          ]
    netFrameworkVersion:'v7.0'
    

    Full bicep available in this question