Azure Function App Deployment Issue
Hello Microsoft Azure Support Team,
My function app on the Azure Portal doesn't show the Azure Functions when I deploy the Function App project in my Visual Studio Solution file. They publish and work correctly on local. I have tried all ways of deployment, attempted setting up configuration variables for the Function app. Please, assist me with a solution.
The Storage account with the File Share Location attached to the Function App shows the published files after deploying using Azure CLI.
Regards
Parnika
Azure Functions
-
Jose Benjamin Solis Nolasco • 631 Reputation points
2025-03-04T20:45:26.3666667+00:00 Hello @Parnika Mittal
I made a little guide for you to check quickly i hope this help you, this happened to me a long time ago...
- Check File Structure: Use the Kudu console (accessible via the Azure Portal by navigating to your Function App → Advanced Tools (Kudu)) to examine the contents of the
site/wwwroot
folder. Ensure that you see:- A
host.json
file. - One or more folders (or files) for your functions containing a corresponding
function.json
file. - Your compiled assemblies (DLLs) alongside these files.
- A
- Include All Necessary Files: In Visual Studio, confirm that your project is correctly configured to include the
function.json
files. Sometimes if these files aren’t marked with the proper "Copy to Output Directory" setting, they may not get published. - Review Deployment Methods
- Publish Profile: Ensure you are using the correct publish profile in Visual Studio. When publishing to Azure, confirm that the target is indeed an Azure Function App and not a Web App or other resource.
- Alternative Deployments: If you suspect an issue with Visual Studio’s deployment, try deploying with an alternative method such as using the Azure CLI or [GitHub Actions]. This can help determine if the problem is with the deployment package or with how the portal is reading it.
Also check
- WEBSITE_RUN_FROM_PACKAGE: If you’re deploying via a package, check if the
WEBSITE_RUN_FROM_PACKAGE
setting is configured correctly. If this setting points to a URL for a package that either isn’t updated or isn’t accessible, your functions may not load. Tip: Try temporarily removing or updating this setting to see if it resolves the issue. - Runtime Version: Verify that the Azure Function runtime version in your Function App settings matches what your project targets. Mismatches between your local runtime and the Azure runtime version (for example, Azure Functions ~3 versus ~4) could result in failures to load the functions.
- Other Configurations: Double-check any other configuration variables (like connection strings or environment variables) that your functions may depend on. Incorrect or missing configurations can sometimes cause the functions runtime to abort silently.
If you found it helpful, could you kindly click the “Accept Answer and upvote” on the post.
If you have any further queries, please let us know we are glad to help you.
- Check File Structure: Use the Kudu console (accessible via the Azure Portal by navigating to your Function App → Advanced Tools (Kudu)) to examine the contents of the
-
Shireesha Eeraboina • 1,980 Reputation points • Microsoft External Staff
2025-03-06T05:29:54.7033333+00:00 Hi @Parnika Mittal ,
Just checking in to see if the above answer provided by @Jose Benjamin Solis Nolasco helped.
If this answers your query, do click
Accept Answer
andYes
for was this answer helpful. And, if you have any further query do let us know. -
Jose Benjamin Solis Nolasco • 631 Reputation points
2025-03-06T13:28:12.4666667+00:00 Just following up, Do you need more guidance or assistance ?
-
Parnika Mittal • 0 Reputation points
2025-03-06T17:16:40.8133333+00:00 Hello Shireesha, thank you for reaching out. I haven’t tried all the recommendations and couldn’t get it resolved.
-
Parnika Mittal • 0 Reputation points
2025-03-06T17:18:16.5133333+00:00 Hello Jose, thank you very much for providing the recommendations, honestly I couldn’t try and have the issue resolved. I m sure it will be helpful and hoping I get my functions deployed.
Regards
Parnika
-
Parnika Mittal • 0 Reputation points
2025-03-10T20:00:38.78+00:00 Hello Jose,
Thank you for all the pointers, however it didn't resolve the issue.
Please, if you may review couple of things:
- Attached is the solution folder which has 4 projects - one of them is Azure Functions project (highlighted). I am publishing this folder to Azure.
Before publish : I set the project to release mode. Set the Copy to Output Directory property for both the .cs files, host json and local.settings.json
- Deployed using the Azure CLI
Set WEBSITE_RUN_FROM_PACKAGE = 1 for the function app created on Azure.
(Previous runs, WEBSITE_RUN_FROM_PACKAGE was not defined)
- Used Kudu to check the file structure
It has the host.json.
But it doesn't have the function.json or the DLL's.
Please, if you may have suggestions that could help further troubleshoot would be really helpful.
Regards
Parnika
- Attached is the solution folder which has 4 projects - one of them is Azure Functions project (highlighted). I am publishing this folder to Azure.
-
Shireesha Eeraboina • 1,980 Reputation points • Microsoft External Staff
2025-03-12T07:00:57.9966667+00:00 Hi @Parnika Mittal ,
Functions Not Appearing in Azure Portal Due to Missing function.json/DLLs After Deployment.
Verify Build Output:
- Ensure that
Microsoft.NET.Sdk.Functions
is updated in your.csproj
file to automatically generatefunction.json
during the build process. - Check the local build output (located in
bin/Release/net6.0
for .NET) to confirm that bothfunction.json
and the necessary DLLs are present before deployment.
Deployment Settings:
- Use the command
func azure functionapp publish <APP_NAME> --publish-local-settings -i
to include local files in the deployment. - If you are using
WEBSITE_RUN_FROM_PACKAGE=1
, verify that the ZIP file contains all required files by checking through Kudu.
Runtime Mismatch:
- Ensure that the Azure Function Runtime version (v4) aligns with your project’s target framework (e.g., .NET 6 should correspond to v4).
To help you better understand, kindly refer to the documentations below:
Please refer to these details as well: https://learn.microsoft.com/en-us/azure/azure-functions/functions-deployment-technologies?tabs=windows
If issues continue, consider redeploying using the Visual Studio Publish Profile instead of the CLI to ensure all necessary files are included.
If you have any further queries, please let us know we are glad to help you.
- Ensure that
Sign in to comment