Unable to deploy Azure function app via VS Code

Harsh Atha 20 Reputation points
2024-12-17T17:01:45.6433333+00:00

Hi,

I am trying to deploy a function app V2 (blob trigger). I created a new one with the existing template/blue print and deployed it.

As soon as I made changes to my code and am deploying it, it shows successful in the Azure terminal/tab on VS Code but unable to see the latest changes or files on the function app even after hours/days. I have deployed this code multiple times and have not seen any new changes there.

I am not getting any error messages that I can share here to showcase the problems.

The folder structure is:

Function App Name:

function_app.py

host.json

requirements.txt

.gitignore

.funcignore

Just to see if the issue is due to some error in my code, I just added 1 logging statement in my def function_name():, but even that is not reflected.

Any help would be appreciated.

Thanks,

Harsh.

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

2 answers

Sort by: Most helpful
  1. hossein jalilian 10,825 Reputation points Volunteer Moderator
    2024-12-17T17:18:16.92+00:00

    Thanks for posting your question in the Microsoft Q&A forum.

    The issue you're experiencing with deploying Azure Functions via VS Code is not uncommon. Here are some steps you can take to troubleshoot and resolve the problem:

    • Ensure you're using the latest version of the Azure Functions extension for VS Code.
    • Verify that remote build is enabled. Check your .vscode/settings.json file for the setting "azureFunctions.scmDoBuildDuringDeployment": true
    • Try deploying using Azure Functions Core Tools instead of VS Code. Use the command func azure functionapp publish <FunctionAppName> in your terminal
    • Check if your function appears in the Azure Portal. If not, there might be an issue with function loading or indexing
    • Verify that your requirements.txt file is correctly listing all necessary dependencies
    • If you're using Python, ensure that the Python version in your local environment matches the one specified in your function app settings
    • Try creating a new function app in Azure Portal first, then deploy to it from VS Code
    • Run Azure Functions Diagnostics in the Azure Portal to identify any configuration issues
    • Check Application Insights logs for any error messages or exceptions that might not be visible in VS Code
    • As a last resort, you can try using the AzureFuncDebugger tool to get a detailed report of your function app's configuration and behavior

    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful

    0 comments No comments

  2. rer 0 Reputation points
    2025-03-27T09:14:08.3033333+00:00

    I had a similar problem though it only occurred after the first Deploy.
    I always started with the premade http_trigger Function and this worked fine.
    After extending it with more functions and requirements I was unable to deploy to the Azure Function app.
    My solution was to remove the logging Library from my requirements.txt, after removing it everything worked fine.
    From what I read this occurs because the logging library is part of the default libraries of python and when you explicitly write it into the requirements.txt it overwrites the default version and is incompatible with the rest of the libraries and therefore the Azure Function app won't accept the code.

    0 comments No comments

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.