question

kn-5791 avatar image
0 Votes"
kn-5791 asked kn-5791 commented

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

I'm currently going through this tutorial on deploying azure functions: https://docs.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
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@kn-5791 , just checking in to see if you got a chance to see my answer below.

0 Votes 0 ·

@kn-5791 , just checking in to see if you got a chance to see my answer below.

0 Votes 0 ·

1 Answer

singhh-msft avatar image
0 Votes"
singhh-msft answered kn-5791 commented

@kn-5791, 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.



image.png (101.4 KiB)
image.png (77.7 KiB)
115.png (13.9 KiB)
116.png (20.1 KiB)
image.png (30.3 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@kn-5791, do share valuable feedback of your experience with us!

0 Votes 0 ·

Great complete answer with examples and screenshots. Love it!

1 Vote 1 ·