I've got a solution that contains a web app and class libraries. I added two Azure function projects to this, the first is version 1 and the second version 2. Both run fine locally. This code is in an online repository (Visual Studio Online, now Azure DevOps), and I set up continuous deployment from it to an Azure function set up in the portal. However, neither project is showing up under Functions in the portal although the code deployed successfully just like Azure websites and the URL says "Your Function App is up and running". I'm using Visual Studio 2017.
-
How did you deploy the Function ? There are numerous ways to deploy the functions like runfromZip , zipDeployment etc – HariHaran May 13 '19 at 04:56
-
@HariHaran Hi, thanks for your comment, I pushed the code base from Visual Studio to Azure DevOps, then synced the Function to DevOps. Just the same as continuous integration with an Azure Website. – nmit026 May 13 '19 at 05:03
-
2Which pipeline task did you use ? Navigate to the `functionappname.scm.azurewebsites.net` and check the bin folder structure – HariHaran May 13 '19 at 05:41
-
1@HariHaran Used Kudu deployment, managed to make it work by publishing directly from Visual Studio, will do some more testing using test projects to get continuous deployment working. – nmit026 May 14 '19 at 03:22
10 Answers
Yet another solution for not showing (deploying) functions - in the CD pipeline "Azure Functions App Deploy", the "Deployment method" was set to "Auto-detect". Changing it to "Zip Deploy" fixed the issue.
What it did technically:
Deleting App Service Application settings. Data: ["WEBSITE_RUN_FROM_ZIP","WEBSITE_RUN_FROM_PACKAGE"]
Updated App Service Application settings and Kudu Application settings.
Package deployment using ZIP Deploy initiated.
When "Auto-detect" was enabled:
Trying to update App Service Application settings. Data: {"WEBSITE_RUN_FROM_PACKAGE":"1"}
Deleting App Service Application settings. Data: ["WEBSITE_RUN_FROM_ZIP"]
App Service Application settings are already present.
Package deployment using ZIP Deploy initiated.

- 571
- 5
- 8
-
2Changing it to "Zip Deploy" instead "Auto-detect" of did work for me, thanks – Arjit Sharma Apr 13 '21 at 21:36
-
1Hey, I'm having a similar problem. I can't find the menu in DevOps "Azure Functions App Deploy"... any chance you could add a screenshot yo your post please? – an0nc0d3r Dec 28 '21 at 22:09
If you have'nt managed to get CD working, here's the trick. You mentioned that you are using Runtime V2 (.NET CORE ). I have some functions setup in CI/CD as well. In the Build Pipeline
Build you function project with dotnet Build
Task and point it with only the Function project path.
And in the arguments of the task add this
/p:DeployOnBuild=true /p:DeployTarget=Package;CreatePackageOnPublish=true
After the build task, use the Publish Artifact
task by default it outputs eveything to $(Build.ArtifactStagingDirectory)
Now the last step. Use the Azure App Service Deploy
task and Authenticate with your credentials like subscription,RG etc.
Now in the App Service Type
choose FunctionApp on Windows/Linux
( your choice)
Now in the Package or Folder
argument provide $(Build.ArtifactStagingDirectory)/YourFunctionProjectName.zip
This helped me to setup CI/CD for Azure Functions.

- 3,642
- 2
- 16
- 33
-
1
-
I tried this but the build did not create a .zip file, is there a missing step to zip up the output files from the build, before adding to the artifact staging? – Randy Gamage Jul 10 '20 at 00:41
While I found @HariHaran's answer helpful, it didn't exactly address my particular problem. Here's the solution I found using a Pre-Compiled Azure function:
- Check in your C# function to a Azure DevOps repo (or any repo).
- Use the following pipeline steps
npm install
- Working Folder: $(System.DefaultWorkingDirectory)
dotnet build
- Arguments: --configuration Release
Archive files
- Root folder: $(System.DefaultWorkingDirectory)/bin/Release/netcoreapp2.1
- Archive type: zip
- Archive file to create: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip)
- Replace existing archive: true
Note your root folder structure may be different for the path to your /bin folder. Adjust accordingly.
Azure Function App Deploy
- (Select your subscription, app type and name)
- Package or folder: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip
The key here for me was to understand that pre-compiled Azure functions require a specific folder structure, as defined here: https://learn.microsoft.com/en-us/azure/azure-functions/functions-dotnet-class-library#functions-class-library-project. Getting the folder/file structure is necessary to allow your functions to show in the Azure portal.
Therefore my structure in the /wwwroot
folder looked something like this:
| - bin
| - MyFunction
| - host.json

- 657
- 1
- 7
- 12
I had this same problem with a .Net Framework on Azure Functions version 1. I fixed it by specifying the proper root folder for the zip file creation: bin/release/net471

- 29
- 5
-
5
-
In the `archiveFiles` task of the build pipeline, I believe. – walkerrandophsmith Aug 05 '21 at 14:33
When archiving try pointing to publish output folder instead of the root folder. For instance, if the build output folder is set to "publish_output" (--output publish_output --configuration Release)
then try to archive the "publish_output" folder, not the entire root folder.
So that when deploying azure function our source package will have only the published output, not the entire folder. Below is a sample to deploy function app using az.
az functionapp deployment source config-zip -g $rg_name -n "$(fnapp_name)" --src $srcpkgpath

- 269
- 1
- 11
-
This did the trick for me. I changed the "Root folder or file to archive" to "publish_output" and now my function shows up in the portal – Tony Aug 14 '23 at 11:13
I think your function is not getting deployed to the correct path in Azure. Check scm/Kudo to verify if it is deployed correctly.

- 1,708
- 16
- 25
Sort of a mess, haven't tested thoroughly, but I managed to deploy it. I deleted the Version 1 Function project, made sure the portal environment was Version 2, disabled continuous deployment, and published manually from Visual Studio. Apart from SCM/Kudu, the folder structure appears to be the same. Not sure which of these did the trick, just glad for now it's working.

- 3,024
- 2
- 27
- 53
I was having the same issue with a function not appearing in the Azure portal when deploying directly from Visual Studio. Solution for me was to "Clean" the solution before redeploying.

- 31
- 4
For me this was resolved by using Azure functions v3. Initially I was was not able to see the azure function on the portal, while I was using Azure function v4 (preview version).

- 39
- 1
- 7
I had the same issue while trying to publish functions from Visual Studio, and in the Azure portal I went to 'Diagnose and solve problems' option and tried the troubleshoot option from there, and it changed the Runtime version of the Function App to ~3 (where it was ~4 before) which resolved my issue.

- 124
- 4