When I deployed the Azure Function (.NET 6) from Visual Studio 2022 Community Version to the Azure Portal Function App, it shown me this error in the Kudu Site:
I published in this way: Visual Studio > Project > Build > Publish > Azure Function App (Windows) - Marked the Check Box Option of "Run from Package"
Can anyone help me how to resolve this issue. Also, what to do for getting rid of the warning shown in yellow background?
I attempted to deploy an Azure Function (.NET 6) to the Azure Function app without receiving any warning messages.
Created a Function app(.Net 6) and successfully deployed it to Azure function app.
Your app is currently in read only mode because you are running from a package file. To make any changes, please update the content in your zip file and WEBSITE_RUN_FROM_PACKAGE app setting.
To Avoid above Warning message
Add WEBSITE_RUN_FROM_PACKAGE value to 0
in Environment variables of your function app.
The purpose of the WEBSITE_RUN_FROM_PACKAGE setting is to control how Azure Functions are executed, either directly from the package file (setting it to 1) or from the deployed files (setting it to 0).
Now, no warning message has appeared.
Here is the output after deployment.
it worked with your solution @SirraSneha but could you please explain that will this error comes for the 1st time deployment from any source like Visual Studio, Azure devops or it comes only for the visual studio 1st time deployment. normally what this setting does in this deployment ?
It can occur during the first-time deployment from any source, whether it's Visual Studio, Azure DevOps, or any other deployment method that uses the Azure Functions deployment.