azure-functions-dotnet-worker: SignalR extensions 1.10.0 Dependency resolution error on .NET 7 isolated worker runtime

Original issue: https://github.com/Azure/azure-webjobs-sdk/issues/2993

Issue description

The host extension Microsoft.Azure.WebJobs.Extensions.SignalRService 1.10.0 (corresponding to the worker extensions Microsoft.Azure.Functions.Worker.Extensions.SignalRService 1.10.0) has dependency resolution error on .NET 7 isolated worker runtime.

Error message:

Microsoft.Azure.WebJobs.Host: Error indexing method ‘Functions.OnConnected’. Microsoft.Azure.SignalR.Management: Could not load file or assembly ‘Microsoft.Extensions.Options, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60’. The system cannot find the file specified.

Comparison with other runtimes or other versions

Please note that the SignalR host extensions and worker extensions have the same version.

  1. Extensions 1.10.0 works well on .NET 6.
  2. Extensions 1.7.0 works well on .NET 7 and .NET 6.
  3. Microsoft.Azure.WebJobs.Extensions.SignalRService 1.10.0 itself runs well on .NET 7 (.NET 7 is one of the test target frameworks for .NET Azure SDK NET client libraries). image

Therefore, I wonder if the cause is related to the .NET 7 isolated worker runtime.

Dependency changes between extensions 1.7.0 and 1.10.0 .

The dependency topology has not changed.

---
title: Dependency graph for extensions 1.7.0
---
flowchart TD
    subgraph Azure SignalR extensions 1.7.0
    Microsoft.Azure.Functions.Worker.Extensions.SignalRService --> Microsoft.Azure.WebJobs.Extensions.SignalRService
    end
    Microsoft.Azure.WebJobs.Extensions.SignalRService --> Microsoft.Azure.SignalR.Management
    subgraph Azure SignalR SDK 1.15.1
    Microsoft.Azure.SignalR.Management --> Microsoft.Azure.SignalR
    Microsoft.Azure.SignalR.Management --> |PrivateAssets=all|Microsoft.Azure.SignalR.Common 
    Microsoft.Azure.SignalR --> |PrivateAssets=all|Microsoft.Azure.SignalR.Common
    end
---
title: Dependency graph for extensions 1.10.0
---
flowchart TD
    subgraph Azure SignalR extensions 1.10.0
    Microsoft.Azure.Functions.Worker.Extensions.SignalRService --> Microsoft.Azure.WebJobs.Extensions.SignalRService
    end
    Microsoft.Azure.WebJobs.Extensions.SignalRService --> Microsoft.Azure.SignalR.Management
    subgraph Azure SignalR SDK 1.21.2
    Microsoft.Azure.SignalR.Management --> Microsoft.Azure.SignalR
    Microsoft.Azure.SignalR.Management --> |PrivateAssets=all|Microsoft.Azure.SignalR.Common 
    Microsoft.Azure.SignalR --> |PrivateAssets=all|Microsoft.Azure.SignalR.Common
    end

The main changes lie in the Azure SignalR SDK.

  1. .NET 7.0 is added to the TFMs of Microsoft.Azure.SignalR.Common .

     <TargetFrameworks>netstandard2.0;netcoreapp3.0;net5.0</TargetFrameworks> <!--The previous TFMs-->
     <TargetFrameworks>netstandard2.0;netcoreapp3.0;net5.0;net7.0</TargetFrameworks> <!--The new TFMs-->
    
  2. .NET 6.0 and .NET 7.0 are added to the TFMs of Microsoft.Azure.SignalR.

    <TargetFrameworks>netstandard2.0;netcoreapp3.0;net5.0</TargetFrameworks>  <!--The previous TFMs-->
    <TargetFrameworks>netstandard2.0;netcoreapp3.0;net5.0;net6.0;net7.0</TargetFrameworks>  <!--The newTFMs-->
    
  3. No TFM change in Microsoft.Azure.SignalR.Management

I cannot figure out the relation between target framework changes of Azure SignalR SDK and dependency resolution error here. Any insights will be appreciated.

Reproducible project: https://learn.microsoft.com/en-us/azure/azure-signalr/signalr-quickstart-azure-functions-csharp?tabs=isolated-process

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 19 (9 by maintainers)

Commits related to this issue

Most upvoted comments

Has this been fixed yet? Extremely painful to find the issue microsoft.azure.functions.worker.extensions.signalrservice in 1.10. went back down to 1.7.0. You get the error that it can’t find Microsoft.Extensions.Options. I was following the examples trying to create an azure signalr serverless negotiate function. I thought it was something the example did not show

@Y-Sindo the SDK update will be released today. The PR has been merged, so closing this issue as completed for the work being tracked in the worker

@Arash-Sabet We need to wait for a dotnet isolated worker runtime update. I have found a PR #1928 by @fabiocav that seems to be resolving the issue. Hopefully we will get an update soon.

@Arash-Sabet we’ve removed 1.10.0, as requested.

The package has been unlisted.

@Arash-Sabet / @Y-Sindo assigning this for the next sprint so we can investigate an appropriate fix, but do want to set the expectation that this may require additional changes that may not land during that sprint.

In the meantime, I’ll request the package removal to avoid additional incidents.

@fabiocav Could we hide the problematic version 1.10 in the Nuget?

@Arash-Sabet @Y-Sindo flagging this for additional investigation. I see the issue causing the problem, but some investigation is required for a proper fix.

We could potentially provide guidance on how to validate a fix ahead of getting the changes in.