After deploying .net8.0 function app using dotnet-isolated worker runtime getting runtime version error on azure portal with error System.linq:sequence contains one or more elements.

Apurva Achrekar 0 Reputation points
2024-11-15T06:08:52.7833333+00:00

I had deployed azure function app succesfully but on portal I see error system.linq:sequence contains one or more matching elements and runtime version is shown as Error.

I have deployed function using ansible playbooks using devops pipeline. Below are the configurations.

deploy-function.yml:

roles:
    - role: ansible-role-azure-function
      azure_function_name: "{{ g_azure_function_name }}"
      azure_hosting_plan_name: "{{ g_azure_asp_name }}"
      azure_storage_account_name: "{{ g_azure_storage_account_name }}"
      azure_function_extension_version: "~4"
      azure_function_dnsregsiter_fqdn: false
      azure_function_worker_runtime: "dotnet-isolated"
      azure_function_netframeworkversion: "v8.0"
      azure_function_use32BitWorkerProcess: false
      azure_function_auth_enabled: false
      azure_function_always_on: true
      azure_function_secure_logging: false
      azure_function_cors_allowedorigins: "{{ g_azure_function_cors_allowedorigins[cvx_environment_name] }}"


azure-pipelines.yml

- ${{ if eq(parameters.deployFunctionApp, 'true') }}:
      - name: "TestFunctionApp"
        type: dotnet
        coreVersion: "8.0.x"
        buildConfiguration: "Release"
        buildPlatform: "AnyCPU"
        filePath: "/TestFunctionApp.API/TestFunctionApp.API.csproj"
        playbook: "/build/deploy-TestFunctionApp.yml"
        ansibleRetryAttempts: 0
        verbosity: -vvv
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,257 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,012 questions
.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,182 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Pinaki Ghatak 5,390 Reputation points Microsoft Employee
    2024-11-15T12:44:43.27+00:00

    Hello @Apurva Achrekar

    It seems like there is an issue with the runtime version of your Azure Function app. The error message System.Linq: Sequence contains one or more elements usually occurs when there is a mismatch between the runtime version specified in your code and the runtime version of the Azure Function app.

    Based on the configurations you have provided, it seems like you have specified the runtime version as v8.0 in your azure_function_netframeworkversion parameter. However, the correct runtime version for .NET 8 (isolated) is 8.0. To fix this issue, you can try updating the azure_function_netframeworkversion parameter to 8.0 in your deploy-function.yml file and redeploying your Azure Function app.

    Additionally, you can also check the runtime version of your Azure Function app on the Azure portal by going to the "Configuration" section of your Function app and checking the value of the "FUNCTIONS_EXTENSION_VERSION" setting.


    I hope that this response has addressed your query and helped you overcome your challenges. If so, please mark this response as Answered. This will not only acknowledge our efforts, but also assist other community members who may be looking for similar solutions.

    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.