title: Azure Pipeline [Azure Functions for container] task appSettings multi parameter
body: <p>I have been developing and deploying .NET 5 Isolated-Process Azure Functions through visual studio 2019.
  Copied the value of the Application configuration setting in local.settings.json from the Publish feature in Visual Studio 2019.</p>
  <p>Now I want to deploy .NET 5 Isolated-Process Azure Functions via Azure Pipeline.
  Below is my yaml file and dockerfile for publishing of Azure Functions.</p>
  <pre><code>trigger:
    branches:
      include:
        - main
  variables:
    BuildConfiguration: Release
    ProjectName: TestAzureFunctionDocker
  
  stages:
    - stage: build
      jobs:
        - job: buildapp
          displayName: Build App
          pool:
            vmImage: ubuntu-20.04
          steps:
            - task: NuGetToolInstaller@1
              inputs:
                versionSpec: 
            - task: UseDotNet@2 
              displayName: Use .NET Core 3.1 SDK
              inputs:
                packageType: 'sdk'
                version: '3.1.x'
            - task: UseDotNet@2
              displayName: Use .NET 5 SDK
              inputs:
                packageType: 'sdk'
                version: '5.0.x'
                includePreviewVersions: true
                performMultiLevelLookup: true
            - task: DotNetCoreCLI@2
              displayName: dotnet restore
              inputs:
                command: 'restore'
                projects: '$(System.DefaultWorkingDirectory)/$(ProjectName)/$(ProjectName).csproj'
                feedsToUse: 'select'
                vstsFeed: 'my feed guid'
            - task: NuGetCommand@2
              displayName: nuget restore
              inputs:
                command: 'restore'
                restoreSolution: '$(System.DefaultWorkingDirectory)/$(ProjectName)/$(ProjectName).csproj'
                feedsToUse: 'config'
                nugetConfigPath: '$(System.DefaultWorkingDirectory)/$(ProjectName)/nuget.config'
            - task: DotNetCoreCLI@2
              displayName: dotnet build $(BuildConfiguration)
              inputs:
                command: 'build'
                arguments: '--configuration $(BuildConfiguration)'
                projects: '$(System.DefaultWorkingDirectory)/$(ProjectName)/$(ProjectName).csproj'
            - task: DotNetCoreCLI@2
              displayName: dotnet publish
              inputs:
                command: 'publish'
                arguments: '--configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory)'
                projects: '$(System.DefaultWorkingDirectory)/$(ProjectName)/$(ProjectName).csproj'
                publishWebProjects: false
                modifyOutputPath: false
                zipAfterPublish: false
            - task: NuGetAuthenticate@0
            - task: DockerInstaller@0
              inputs:
                dockerVersion: '17.09.0-ce'
            - task: Docker@2
              displayName: build docker image
              inputs:
                containerRegistry: 'Azure Functions Pipeline'
                repository: 'mytestimage'
                command: 'build'
                Dockerfile: '$(System.DefaultWorkingDirectory)/$(ProjectName)/Dockerfile'
                arguments: '--build-arg PAT=$(PAT)'
            - task: Docker@2
              displayName: docker image push to azure container registry
              inputs:
                containerRegistry: 'Azure Functions Pipeline'
                repository: 'mytestimage'
                command: 'push'
            - task: AzureFunctionAppContainer@1
              inputs:
                azureSubscription: 'My MSP Service Connection'
                appName: 'azservicebustriggercontainertest'
                imageName: 'myacrname/mytestimage:$(Build.BuildId)'
                appSettings: |
                  -CloudOption:ContainerName &quot;string0&quot;
                  -CloudOption:AccessKeyId &quot;string1&quot;
                  -CloudOption:SecretKey &quot;string2&quot;
                  -CloudOption:ProjectId &quot;string3&quot;
                  -CloudOption:DomainId &quot;string4&quot;
                  -CloudOption:Account &quot;string5&quot;
  </code></pre>
  <pre><code>FROM mcr.microsoft.com/azure-functions/dotnet-isolated:3.0-dotnet-isolated5.0 AS base
  WORKDIR /home/site/wwwroot
  EXPOSE 80
  
  FROM mcr.microsoft.com/dotnet/runtime:3.1 as runtime3_1
  FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
  COPY --from=runtime3_1 /usr/share/dotnet/host /usr/share/dotnet/host
  COPY --from=runtime3_1 /usr/share/dotnet/shared /usr/share/dotnet/shared
  
  WORKDIR /src
  
  RUN curl -L https://raw.githubusercontent.com/Microsoft/artifacts-credprovider/master/helpers/installcredprovider.sh | sh
  ARG PAT
  ENV VSS_NUGET_EXTERNAL_FEED_ENDPOINTS &quot;{\&quot;endpointCredentials\&quot;: [{\&quot;endpoint\&quot;:\&quot;my azure devops private nuget feed uri\&quot;, \&quot;password\&quot;:\&quot;${PAT}\&quot;}]}&quot;
  
  FROM build AS publish
  COPY . /src/dotnet-function-app
  RUN cd /src/dotnet-function-app &amp;&amp; \
      mkdir -p /home/site/wwwroot &amp;&amp; \
      dotnet publish /src/dotnet-function-app/TestAzureFunctionDocker.csproj --output /home/site/wwwroot
  
  FROM base AS final
  WORKDIR /home/site/wwwroot
  ENV AzureWebJobsScriptRoot=/home/site/wwwroot \
      AzureFunctionsJobHost__Logging__Console__IsEnabled=true
  
  COPY --from=base [&quot;/home/site/wwwroot&quot;, &quot;/home/site/wwwroot&quot;]
  </code></pre>
  <p>Important information has been deleted.</p>
  <p>All Task Steps succeeded and 'Azure Functions for container' failed.</p>
  <blockquote>
  <h1>Starting: AzureFunctionAppContainer</h1>
  <h1>Task         : Azure Functions for container
  Description  : Update a function app with a Docker container
  Version      : 1.195.0
  Author       : Microsoft Corporation
  Help         : <a href="https://aka.ms/azurefunctioncontainertroubleshooting" rel="nofollow noreferrer">https://aka.ms/azurefunctioncontainertroubleshooting</a></h1>
  <p>Got service connection details for Azure App Service:'azservicebustriggercontainertest'
  Trying to update App Service Configuration settings. Data: { &quot;appCommandLine&quot;:null,&quot;linuxFxVersion&quot;:&quot;DOCKER|myacrname/mytestimage:1069&quot;}
  Updated App Service Configuration settings.
  Restarting App Service: azservicebustriggercontainertest
  App Service 'azservicebustriggercontainertest' restarted successfully.
  Trying to update App Service Application settings. Data: {&quot;CloudOptionContainerName&quot;:&quot;&quot;string0&quot;\n-&gt; CloudOptionAccessKeyId&quot;,&quot;&quot;:&quot;AUTH_8556e13c15264137a6a9e78811845b46&quot;,&quot;WEBSITES_ENABLE_APP_SERVICE_STORAGE&quot;:&quot;false&quot;}
  [error]Error: Failed to update App service 'azservicebustriggercontainertest' application settings. Error: BadRequest - Parameter name cannot be empty. (CODE: 400)
  Successfully added release annotation to the Application Insight : azservicebustriggercontainertest
  Successfully updated deployment History at <a href="https://azservicebustriggercontainertest.scm.azurewebsites.net/api/deployments/10691641974029296" rel="nofollow noreferrer">https://azservicebustriggercontainertest.scm.azurewebsites.net/api/deployments/10691641974029296</a>
  App Service Application URL: <a href="http://azservicebustriggercontainertest.azurewebsites.net" rel="nofollow noreferrer">http://azservicebustriggercontainertest.azurewebsites.net</a>
  Finishing: AzureFunctionAppContainer</p>
  </blockquote>
  <p>Looking at the log, it seems that the setting value is not entered properly.</p>
  <p>Also, if you set App Settings with Generic Host Configuration in C#, you set it <a href="https://docs.microsoft.com/en-us/azure/azure-functions/functions-dotnet-dependency-injection#working-with-options-and-settings" rel="nofollow noreferrer">this way</a>, but I wonder if you set and update in the same way in azure pipeline.</p>
  <p>In conclusion, how can I write yaml in Azure Pipeline to configure multiple settings as if they were used in Generic Host in C#?</p>