Azure function app goes missing after deploying using VS code

Paul Titcomb 0 Reputation points
2025-02-05T11:57:47.92+00:00

Hi there, I pretty new to Azure functions and I am having real problems with deployment. I am using the VS Code Azure functions extension to create a new HTTP trigger function and deploy it to Azure. This seems to work fine with the example code it generates, but as soon as I change this example code and re-deploy the function it completely goes missing in the Azure portal. I can't see my function name in the overview of my function app.

By re-deploying my function code from VS Code I am obviously breaking something, but Co-pilot has been next to useless in helping me find the cause. Like I say I created the function using the commands in VS code, so i didn't write any of the config myself, it was all generated.

Can anyone help me figure out what is going on?

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,413 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Khadeer Ali 3,430 Reputation points Microsoft Vendor
    2025-02-05T17:06:30.0366667+00:00

    @Paul Titcomb

    Welcome to Microsoft Q&A Platform!

    Thanks for reaching out. If you’re deploying an Azure Function using VS Code and it goes missing after redeployment, keep in mind that deploying to an existing function app will overwrite its contents in Azure. This means your function might disappear if it’s not included in the new deployment.

    Here’s how to troubleshoot:

    1. Check Deployment Output: After deploying, hit "View Output" to see the creation and deployment results. This can help spot any errors during the process.
    2. Function Configuration: Make sure your function's configuration is correct and included in the deployment package. Double-check that the function is properly defined and all necessary files are there, especially if you tweaked the example code.
    3. Existing Function App: Remember, deploying to an existing function app will overwrite its previous contents. Ensure you’re deploying the right function code.
    4. Azure Portal: After deployment, check the Azure portal to see if the function is listed under the correct function app. It might not show up immediately due to caching or other issues.

    If the problem keeps happening, try creating a new function app for your deployments to avoid overwriting existing functions.

    References:


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.