Functions: Can deploy on windows and it runs just fine, but deploying on linux, it doesn't run

kn 236 Reputation points
2021-06-17T06:45:31.613+00:00

I'm currently going through this tutorial on deploying azure functions: https://learn.microsoft.com/en-us/learn/modules/develop-test-deploy-azure-functions-with-visual-studio/5-exercise-publish-azure-functions

It appears that I can deploy and run the code on Windows machine, but not on Linux? I thought .net core was supposed to be able to run on both Linux and windows?

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

Accepted answer
  1. singhh-msft 2,431 Reputation points
    2021-06-17T12:24:34.177+00:00

    @kn , thank you for reaching out to us. Azure Function Apps can run on Linux, check out Create a function app on Linux in an Azure App Service plan for more information. Further, I deployed WatchPortalFunction on Linux Azure Function App:

    106609-image.png

    and it runs successfully:

    106643-image.png

    I suspect that you might have tried to Web Deploy your solution using VS, I would recommend you to make sure that you deploy using Zip Deploy:

    106598-115.png

    I am also getting error if I Web Deploy:

    106624-116.png

    And, this behavior is because Linux does not support Web Deploy method:

    106589-image.png

    Let me know if you have any follow-up query, will be happy to address.

    -----------------------------------------------------------------------------------------------------------

    Please "Accept the answer" and upvote if the information helped you. This will help us and others in the community as well.


0 additional answers

Sort by: Most helpful

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.