Problem deploying an Azure Function to a Function App

70 Views Asked by At

I have been trying to deploy an Azure function from Visual Studio Code to a function app on Azure. I am getting a message that the deployment was successful, but the Azure function does not appear in the function app on Azure. Here is the image of my file structure on VS Code. Any help would be appreciated.

file structure

I tried to change the configuration of the host.json file, but the same problem keeps happening.

code capture

1

There are 1 best solutions below

1
Vivek Vaibhav Shandilya On

This issue occurs when Function Syntax is incorrect, Code is incorrect, Deployed files are not properly getting deployed in correct folder structure. which prevents Azure function to recognize code as function.

  • Make sure proper Azure Function syntax is being used.
  • Make sure code is running Locally fine by running locally in vs code.

I deployed HTTP trigger function, it worked perfectly fine.

OUTPUT: