microsoft / microsoft/durabletask-netherite

Could not load file or assembly Microsoft.Bcl.AsyncInterfaces when upgrading to 3.0.0

Open
#443 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P2
Dominant language
C#
Stars
239
Forks
37
Avg merge
1d 10h
Merged PRs (30d)
2

Description

When DurableTask.Netherite package is used from an application targeting net8.0, upgrading to version 3.0.0 results in a failure at runtime with the error below.

This is likely due to the change in target frameworks that was introduced by #437

As described here this behavior is expected when targeting .NET Standard 2.0 and the best fix is for packages to add Microsoft.Bcl.AsyncInterfaces as an explicit dependency.

DurableTask.AzureStorage package is already doing it

System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Bcl.AsyncInterfaces, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.

File name: 'Microsoft.Bcl.AsyncInterfaces, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
   at DurableTask.Netherite.EventHubsTransport.EventHubsConnections.EnsurePartitionsAsync(Int32 partitionCount, Int32 retries)
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at DurableTask.Netherite.EventHubsTransport.EventHubsConnections.EnsurePartitionsAsync(Int32 partitionCount, Int32 retries)
   at DurableTask.Netherite.EventHubsTransport.EventHubsConnections.StartAsync(TaskhubParameters parameters) in /_/src/DurableTask.Netherite/TransportLayer/EventHubs/EventHubsConnections.cs:line 66
   at DurableTask.Netherite.EventHubsTransport.EventHubsTransport.DurableTask.Netherite.ITransportLayer.StartAsync() in /_/src/DurableTask.Netherite/TransportLayer/EventHubs/EventHubsTransport.cs:line 116
   at DurableTask.Netherite.NetheriteOrchestrationService.StartClientAsync() in /_/src/DurableTask.Netherite/OrchestrationService/NetheriteOrchestrationService.cs:line 414
   at DurableTask.Netherite.NetheriteOrchestrationService.<>c__DisplayClass92_0`1.<<TryTransition>g__conditionalTransition|0>d.MoveNext() in /_/src/DurableTask.Netherite/OrchestrationService/NetheriteOrchestrationService.cs:line 386
--- End of stack trace from previous location ---
   at DurableTask.Netherite.NetheriteOrchestrationService.TryStartAsync(Boolean clientOnly) in /_/src/DurableTask.Netherite/OrchestrationService/NetheriteOrchestrationService.cs:line 343
   at DurableTask.Netherite.NetheriteOrchestrationService.GetClientAsync() in /_/src/DurableTask.Netherite/OrchestrationService/NetheriteOrchestrationService.cs:line 73
   at DurableTask.Netherite.NetheriteOrchestrationService.DurableTask.Core.IOrchestrationServiceClient.CreateTaskOrchestrationAsync(TaskMessage creationMessage, OrchestrationStatus[] dedupeStatuses) in /_/src/DurableTask.Netherite/OrchestrationService/NetheriteOrchestrationService.cs:line 655
   at DurableTask.Core.TaskHubClient.InternalCreateOrchestrationInstanceWithRaisedEventAsync(String orchestrationName, String orchestrationVersion, String orchestrationInstanceId, Object orchestrationInput, IDictionary`2 orchestrationTags, OrchestrationStatus[] dedupeStatuses, String eventName, Object eventData, Nullable`1 startAt) in /_/src/DurableTask.Core/TaskHubClient.cs:line 677

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect the Netherite package project and the dependency change from #437, then compare its package references with the DurableTask.AzureStorage project linked in the issue. Reproduce the net8.0 runtime failure with DurableTask.Netherite 3.0.0 and verify that the Microsoft.Bcl.AsyncInterfaces assembly loads successfully after the dependency is declared.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.