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