0

When I try to run my durable function I get this error:

A ScriptHost error has occurred.

Microsoft.Azure.WebJobs.Extensions.DurableTask: Could not load file or assembly 'Microsoft.AspNetCore.Hosting.Abstractions, Version=1.0.4.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' or one of its dependencies. The system cannot find the file specified.

The error even persists if I try to deploy to Azure.

Currently my NuGet package for Microsoft.Azure.WebJobs.Extensions.DurableTask has a dependency on Microsoft.AspNetCore.Hosting.Abstractions for version >= 1.1.2.0. This is also the version I can see in my project.

I've tried to delete the bin folder and uninstall/install Visual Studio 2019, but no luck so far.

I'm fairly certain that it is a local issue on my PC since I asked my colleague to pull the code and run it, and there were no issues

Jeppe
  • 1,424
  • 2
  • 15
  • 36
  • Maybe you can refer to this [issue](https://stackoverflow.com/questions/44907819/microsoft-aspnetcore-hosting-abstractions-manifest-definition-does-not-match-the). – Frank Borzage Jul 21 '20 at 09:30
  • @FrankGong Thanks for your suggestion, the solution from that changed nothing for me – Jeppe Jul 21 '20 at 10:56

1 Answers1

0

Seems to me you're using the old version for Microsoft.Azure.WebJobs.Extensions.DurableTask. The current one is version 2.2.2

Install-Package Microsoft.Azure.WebJobs.Extensions.DurableTask -Version 2.2.2
Thiago Custodio
  • 17,332
  • 6
  • 45
  • 90
  • Correct, I am currently on 1.8.6, as I am trying to run a V1 durable function. DurableTask version 2+ is not compatible with functions V1 – Jeppe Jul 22 '20 at 06:18
  • nothing works on v1 anymore. You should upgrade to v2/v3 – Thiago Custodio Jul 22 '20 at 13:43
  • I'd love to, but as always there are constraints. The function uses assemblies that is not .NET Core compatible – Jeppe Jul 23 '20 at 06:24
  • I've been there. Honestly, you'll fix this and other part will break due dependency on specific version of packages. The only possible solution without rewriting on .net core is: move everything to Azure Container Instances and use your Azure Function to Trigger it – Thiago Custodio Jul 23 '20 at 12:51