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.