Deployed an Azure Function through YAML file for a .Net application but the azure portal is not showing the function. Please share correct YAML file or advise

Ashiqur Rahaman 0 Reputation points
2025-02-28T05:20:36.35+00:00

Deployed an Azure Function through YAML file for a .Net application but the azure portal is not showing the function APP. Please share correct YAML file or advise

==================DEPLOYMENT YAML FILE FOR AZURE FUNCTIONS=================

trigger:

  • AEDev

pool:

vmImage: 'windows-latest'

variables:

solution: '**/*.sln'

buildPlatform: 'Any CPU'

buildConfiguration: 'Release'

Azure Resource Manager connection created during pipeline creation

azureServiceConnectionId: '3712d8e6-d1ae-4179-a46e-148801b1f253'

Resource Group

resourceGroupName: 'jltechdev-rg'

Web app name

webAppName: 'jltech-dev-aeserviceP01'

Environment name

environmentName: 'jltech-dev-aeserviceP01'

stages:

  • stage: Build displayName: Build and Publish jobs:
    • job: Build displayName: Build Job pool: vmImage: 'windows-latest' steps:
      • task: UseDotNet@2 inputs: packageType: 'sdk' version: '8.x' installationPath: $(Agent.ToolsDirectory)/dotnet
      • task: NuGetToolInstaller@1
      • task: NuGetCommand@2 inputs: restoreSolution: '$(solution)' feedsToUse: config
      • task: VSBuild@1 inputs: solution: '$(solution)' #msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactstagingdirectory)"' #msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:DesktopBuildPackageLocation="$(build.artifactStagingDirectory)\WebApp.zip" /p:DeployIisAppPath="Default Web Site"' msbuildArgs: '/t:Publish /p:Configuration=Release /p:PublishDir=$(build.artifactstagingdirectory)\siteroot' platform: '$(buildPlatform)' configuration: '$(buildConfiguration)' displayName: 'Build and Publish the project'
      • task: ArchiveFiles@2 inputs: rootFolderOrFile: '$(build.artifactstagingdirectory)\siteroot' includeRootFolder: false archiveType: 'zip' archiveFile: '$(build.artifactstagingdirectory)$(Build.BuildId).zip' replaceExistingArchive: true
      • task: PublishBuildArtifacts@1 inputs: PathtoPublish: '$(build.artifactStagingDirectory)' ArtifactName: 'drop'
  • stage: Deploy displayName: Deploy to Azure App Service jobs:
    • job: Deploy displayName: Deploy Job pool: vmImage: 'ubuntu-latest' steps:
      • download: current artifact: drop
      • task: AzureCLI@2 displayName: "Azure Web App Deploy" inputs: azureSubscription: $(azureServiceConnectionId) scriptType: pscore scriptLocation: inlineScript inlineScript: |
        az functionapp deployment source config-zip `
        
          --resource-group $(resourceGroupName) `
        
          --name $(webAppName) `
        
          --src $(Pipeline.Workspace)/drop/*.zip
        
Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
1,087 questions
0 comments No comments
{count} votes

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.