gpt4 book ai didi

c# - Entity Framework Core 导致无法加载 netstandard

转载 作者:行者123 更新时间:2023-12-04 01:36:11 24 4
gpt4 key购买 nike

我在 Visual Studio 2019 版本 16.5.0 Preview 1 中使用 .NET Core 3.1 运行带有 Http 触发器的 Azure 函数,但出现以下错误:

The 'HttpTriggerCSharp' function is in error: Unable to load one or more of the requested types. [12/25/2019 9:32:30 PM]

Could not load file or assembly 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified. [12/25/2019 9:32:30 PM]

Microsoft.Azure.WebJobs.Host: Error indexing method 'HttpTriggerCSharp'. Microsoft.Azure.WebJobs.Host: cannot bind parameter 'log' to type ILogger. Make sure the parameter type is supported by the binding. If you're using binding extensions (e.g. Azure Storage, ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. builder.AddAzureStorage(), builder.AddServiceBus(), builder.AddTimers(), etc.).

当我安装 Microsoft.EntityFrameworkCore.SqlServer 的 nuget 包时出现错误。

知道如何解决这个问题吗?

最佳答案

事实证明,我正在运行 Azure Function 运行时的 v2,当我在 FunctionApp1.csproj 文件中将其更改为 v3 时,它开始工作。

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AzureFunctionsVersion>v3</AzureFunctionsVersion>
</PropertyGroup>

关于c# - Entity Framework Core 导致无法加载 netstandard,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59482013/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com