Could not load file or assembly 'Microsoft.Azure.WebJobs.EventHubs on Azure Function under runtime ~3

3

I am currently updating my Azure Function from 2.2 to 3.1, I have updated all the packages and csproj

  <PropertyGroup>
    <TargetFramework>netcoreapp3.1</TargetFramework>
    <AzureFunctionsVersion>v3</AzureFunctionsVersion>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="FluentValidation" Version="8.6.0" />
    <PackageReference Include="GeoJSON" Version="2.1.0" />
    <PackageReference Include="GeoTimeZone" Version="4.0.0" />
    <PackageReference Include="Microsoft.Azure.EventHubs.Processor" Version="4.1.0" />
    <PackageReference Include="Microsoft.Azure.WebJobs" Version="3.0.14" />
    <PackageReference Include="Microsoft.Azure.WebJobs.Extensions.CosmosDB" Version="3.0.5" />
    <PackageReference Include="Microsoft.NET.Sdk.Functions" Version="3.0.2" />
    <PackageReference Include="Microsoft.Azure.WebJobs.Extensions.EventHubs" Version="4.1.0" />
    <PackageReference Include="NodaTime" Version="2.4.7" />
  </ItemGroup>

And I get this error only when I set Runtime version Runtime version: 3.0.12939.0 (~3 ). However if I keep Runtime version: 2.0.12888.0 (~2) it would work without errors.

The function runtime is unable to start. System.Private.CoreLib: Could not load file or assembly 'Microsoft.Azure.WebJobs.EventHubs, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Could not find or load a specific file. (0x80131621). System.Private.CoreLib: Could not load file or assembly 'Microsoft.Azure.WebJobs.EventHubs, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

I have also tried deleting the function app and creating a new one but still the same issue.

azure-functions
azure-functions-runtime
asked on Stack Overflow Dec 19, 2019 by Azran • edited Dec 19, 2019 by Azran

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0