Azure Functions for .net 8.0 are not attaching in deployed environments

Hunter Doerr 0 Reputation points
2024-07-31T16:04:05.8066667+00:00

We are trying to upgrade our azure functions project from .net 6 to .net 8. In local development, the project will run correctly and all expected triggers are available. However, when this project is deployed to azure, none of the functions are visible. We have tried starting a blank slate project and deploying it, but we get the same result.

This is the migration guide we followed: https://learn.microsoft.com/en-us/azure/azure-functions/migrate-version-3-version-4?tabs=net8%2Cazure-cli%2Cwindows&pivots=programming-language-csharp

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,911 questions
Developer technologies .NET Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. youzeliang 895 Reputation points
    2024-08-28T16:07:45.1533333+00:00

    It sounds like you're encountering an issue with the deployment process or configuration when upgrading your Azure Functions from .NET 6 to .NET 8. Here are some steps to help diagnose and resolve the problem:

    Check Function App Settings:

    • Ensure that your Azure Function App is configured to use the correct runtime stack (in this case, .NET 8). You can verify this in the Azure portal under "Configuration" > "General settings".

    Check Application Insights Logs:

      - If Application Insights is enabled for your Function App, check the logs for any errors or warnings that might provide clues about why the functions are not being recognized in the deployed environment.
      
      **Verify `host.json` Configuration**:
      
         - Make sure that the `host.json` file is correctly configured for .NET 8 and that there are no legacy settings from .NET 6 that might conflict with the new runtime.
         
         **Deployment Artifacts**:
         
            - Ensure that the correct artifacts are being deployed. Sometimes, incorrect settings in the deployment pipeline or build process can result in outdated or incomplete files being deployed to Azure.
            
            **Check for Binding and Extension Issues**:
            
               - Verify that all required bindings and extensions are properly configured and compatible with .NET 8. Missing or incompatible bindings can prevent functions from being loaded correctly.
               
               **Function App Logs and Console Output**:
               
                  - Enable diagnostic logging and review the console output and logs in the Azure portal. Look for any errors that might indicate why the functions are not being loaded.
                  
                  **Try Manual Deployment**:
                  
                     - If you're using an automated deployment pipeline, try deploying the project manually using tools like Azure CLI or Visual Studio. This can help determine if the issue is related to the deployment pipeline itself.
                     
                     **Double-check the Azure Functions Version**:
                     
                        - Ensure that the correct version of Azure Functions is being targeted in the project settings. Sometimes, the upgrade process might not update the version correctly.
                        
    

    If my answer is helpful to you, you can accept it. Thank you.

    0 comments No comments

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.