Functions are not listed under function app in Azure Portal

Emiel Van Belle 0 Reputation points
2025-03-26T16:23:21.7666667+00:00

Hello!

I am experiencing an issue trying to deploy a dotnet Azure function using Azure DevOps pipelines. The pipeline is running successfully, the runtime version is detected, but there is no function listed under 'Overview > Functions' in the portal. When I publish the same Function App using a publish profile in Visual Studio however, everything is working fine. When I use 'Download app content' to compare the 2 methods, the function code is there and -seems- to be identical.

I am using the following .yml template:

trigger:
  - master

stages:
  - stage: LintIaC
    jobs:
      - job: LintIaC
        displayName: Lint IaC
        steps:
          - script: |
              az bicep build --file iac/main.bicep
            name: LintIaC
            displayName: Run Bicep linter

  - stage: ValidateIaC
    jobs:
      - job: ValidateBicepCode
        displayName: Validate Bicep code
        steps:
          - task: AzureResourceManagerTemplateDeployment@3
            name: RunPreflightValidation
            displayName: Run preflight validation
            inputs:
              deploymentMode: Validation
              deploymentScope: "Resource Group"
              azureResourceManagerConnection: "Authenticators"
              action: "Create Or Update Resource Group"
              resourceGroupName: "rg-authenticators-live"
              location: "germanywestcentral"
              templateLocation: "Linked artifact"
              csmFile: "./iac/main.bicep"
              deploymentName: $(Build.BuildNumber)

  - stage: DeployIaC
    jobs:
      - job: Deploy
        steps:
          - task: AzureResourceManagerTemplateDeployment@3
            name: Deploy
            displayName: Deploy to Azure
            inputs:
              deploymentMode: "Incremental"
              deploymentScope: "Resource Group"
              azureResourceManagerConnection: "Authenticators"
              action: "Create Or Update Resource Group"
              resourceGroupName: "rg-authenticators-live"
              location: "germanywestcentral"
              templateLocation: "Linked artifact"
              csmFile: "./iac/main.bicep"
              deploymentName: $(Build.BuildNumber)

  - stage: BuildSrc
    jobs:
      - job: Build
        pool:
          vmImage: "windows-latest"
        steps:
          - task: DotNetCoreCLI@2
            inputs:
              command: restore
              projects: "**/*.csproj"
          - task: DotNetCoreCLI@2
            inputs:
              command: build
              projects: "**/*.csproj"
              arguments: "--configuration Release"
          - task: DotNetCoreCLI@2
            inputs:
              command: publish
              arguments: "--configuration Release --output publish_output"
              projects: "**/*.csproj"
              publishWebProjects: false
              modifyOutputPath: false
              zipAfterPublish: false
          - task: ArchiveFiles@2
            inputs:
              rootFolderOrFile: "$(System.DefaultWorkingDirectory)/publish_output"
              includeRootFolder: false
              archiveFile: "$(Build.ArtifactStagingDirectory)/build$(Build.BuildId).zip"
          - task: PublishBuildArtifacts@1
            inputs:
              pathtoPublish: "$(Build.ArtifactStagingDirectory)/build$(Build.BuildId).zip"
              artifactName: "drop"

  - stage: DeploySrc
    jobs:
      - job: Deploy
        steps:
          - task: DownloadBuildArtifacts@0
            inputs:
              buildType: "current"
              artifactName: "drop"
              downloadPath: "$(System.ArtifactsDirectory)"
          - task: AzureFunctionApp@2
            inputs:
              azureSubscription: "Authenticators"
              appType: functionApp
              appName: "func-silverfintokenmanager-live"
              package: "$(System.ArtifactsDirectory)/drop/build$(Build.BuildId).zip"

What am I missing?

Best regards,

Emiel

Azure DevOps
{count} votes

1 answer

Sort by: Most helpful
  1. Pravallika Kothaveeranna Gari 955 Reputation points Microsoft External Staff Moderator
    2025-03-27T11:11:40.14+00:00

    Emiel Van Belle, Glad that you are able to resolve the issue by updating your yaml.

    Follow below steps to modify the name of .zip:

    1. Specify the name of the .zip file using the --output argument in Publish step. You might also need to use a custom name for the .zip archive.
    2. After creating the .zip, add its reference with the custom name in the AzureFunctionApp@2 deployment task.

    Modify the DotNetCoreCLI@2 task:

    - task: DotNetCoreCLI@2
      inputs:
        command: publish
        arguments: "--configuration Release --output $(Build.ArtifactStagingDirectory)/SilverfinTokenManager_custom.zip"
        projects: "**/*.csproj"
        publishWebProjects: false
    

    And then use this custom name in AzureFunctionApp@2 task:

    
    - task: AzureFunctionApp@2
      inputs:
        azureSubscription: "Authenticators"
        appType: functionApp
        appName: "func-silverfintokenmanager-live"
        package: "$(System.ArtifactsDirectory)/drop/SilverfinTokenManager_custom.zip"
    

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.