0

I have a simple Azure Function which was running in .NET Core 3.1

I am now trying to update it to .NET 7 version 4.x and Im getting a very unhelpful message

System.Private.CoreLib: Could not load file or assembly 'Microsoft.AspNetCore.Mvc.Abstractions, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.

Has anyone come across this?

My packages are shown below

enter image description here

Even more annoying is that when I try to create a new function even though I have the latest Visual Studio I dont see .NET 7, only .NET 6 which is of no help either

The documentation on MS has instructions that havent been updated since 17.4 was in preview

Can anyone help please?

Paul

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Paul
  • 2,773
  • 7
  • 41
  • 96

1 Answers1

0

I am now trying to update it to .NET 7 version 4.x and Im getting a very unhelpful message

(OR)

though I have the latest Visual Studio I don’t see .NET 7

As of now, Only Isolated worker process is released in .NET 7 Azure Functions 4.x as shown in this MS Doc.

System.Private.CoreLib: Could not load file or assembly ‘Microsoft.AspNetCore.Mvc.Abstractions, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60’. The system cannot find the file specified.

I found two issues 74368240 and 74470489 that says version 7.0.0 of Microsoft.X NuGet Package is having the issues and not compatible with .NET 7 Version which is not yet released.

Even the package Microsoft.AspNetCore.Mvc.Abstractions you’re using is compatible with the .NET 7:

enter image description here

It does not work until the .NET 7 (In-process) is released for the Azure Functions 4.x version.

Pravallika KV
  • 2,415
  • 2
  • 2
  • 7