Running into assembly error on Azure function app - System.IO.FileNotFoundException at Microsoft.Azure.WebJobs.Extensions.SignalRService.SignalRTriggerBindingProvider.TryCreateAsync

Nandini Rao [nandinirao-z] 6 Reputation points
2022-10-20T19:31:39.947+00:00

I am running into this assembly error when the isolated function app is deployed to Azure. I get a 500 internal error every time I hit a request on the app. It works correctly without the signalR functionality that I just added. The signalR service is already running on the Azure environment and is functioning correctly.

The function app is an isolated function.

Here is my csproj package reference:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
<OutputType>Exe</OutputType>
<_FunctionsSkipCleanOutput>true</_FunctionsSkipCleanOutput>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="2.2.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="1.8.0-preview1" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http" Version="3.0.13" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.OpenApi" Version="1.2.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.SignalRService" Version="1.7.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Timer" Version="4.0.1" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.3.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.3" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.SignalRService" Version="1.7.0" />
</ItemGroup>

I shouldn't have to add WebJobs.Extensions.SignalRService since I am using the function worker version of SignalR but I added the Webjobs package just to test if it would fix the error. But the same error continues.

It works fine on my local but I run into errors when deployed to Azure -
The innermost error is:
InnermostType
System.IO.FileNotFoundException
innermostMessage
Could not load file or assembly 'Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.

I would appreciate any help asap - I am blocked from testing out our signalR functionality till the deployment issue is fixed.

Thanks,
Nandini

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,911 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Nandini Rao [nandinirao-z] 6 Reputation points
    2022-10-20T22:26:06.023+00:00

    We got it working! We had to change the FUNCTIONS_EXTENSION_VERSION ~3 (the function runtime settings shows only the history of already set runtime versions, not the full available options) and this solved the runtime assembly issues.

    Hope this helps other people!


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.