Functions in azure functions not showing up
try creating a pre-compiled Azure function by using following pipelines
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 structure in the /wwwroot
folder looked something like this:
| - bin
| - MyFunction
| - host.json
for further information you can go through the SO