Azure / azure-functions-vs-build-sdk

MSBuild task for Azure Functions
MIT License
96 stars 62 forks source link

Microsoft.NET.Sdk.Functions 4.x does not work with Microsoft.EntityFrameworkCore 7.x #609

Closed kevin808 closed 1 year ago

kevin808 commented 1 year ago

Summary:

After install Microsoft.EntityFrameworkCore with version 7.x, the V4 function app failed to start in Visual Studio 2022

[2023-02-15T06:38:53.138Z] A host error has occurred during startup operation '48eb8cc1-4df2-49df-a3b3-30813c5b03e1'. [2023-02-15T06:38:53.139Z] System.Private.CoreLib: Could not load file or assembly 'Microsoft.Extensions.Logging.Abstractions, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.

Known Workarounds:

Use Microsoft.EntityFrameworkCore with version 6.x

Repro:

Create a new Function App in VS2022 with standard templated HTTP trigger - .NET 6 Open Mange Nuget and install Microsoft.EntityFrameworkCore (for example, latest stable: 7.0.3) Run the function app.

kshyju commented 1 year ago

For in-proc functions, you should stick with 6.X version of the packages. Dotnet isolated model is the one which supports .NET 7 https://techcommunity.microsoft.com/t5/apps-on-azure-blog/announcing-the-net-7-for-azure-functions-isolated-worker-process/ba-p/3671398

ghost commented 1 year ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.