Azure Functions 依赖项与 AzureFunctionsTools 依赖项发生冲突

标签 azure .net-core dependencies azure-functions

我有一个带有许多依赖项的 Azure Function,包括 Nuget.VersioningMicrosoft.Extensions.Logging.Abstractions .

当我尝试启动我的函数(本地或部署)时,会导致这些文件出现错误:

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

正确的版本位于 bin 目录中,因此当我查看加载的模块时,我可以看到这些依赖项的旧版本,它们已经加载,位于: C:\Users\<user>\AppData\Local\AzureFunctionsTools\Releases\3.23.5\cli_x64

有没有比让我的 nuget 依赖项针对任何 AzureFunctionsTools 的相同版本更好的方法? ' 依赖关系?

随机浏览长长的列表AzureFunctionsTools依赖项有很多已经过时了。我的功能使用.net core 3.1。

最佳答案

您可以尝试降级所有 5.0.0 库,例如 Microsoft.EntityFrameworkCore.SqlServerMicrosoft.EntityFrameworkCoreMicrosoft.EntityFrameworkCore.SqlServer.NetTopologySuitefrom 5.0 到 3.1.x。

或者,升级到.Net 5

请引用GitHub issueSO Thread类似问题的进一步引用。

关于Azure Functions 依赖项与 AzureFunctionsTools 依赖项发生冲突,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69110549/

相关文章:

azure - 如何在 Azure 角色上使用 BCP.exe?

azure - 导入 Azure 数据工厂 V2 ARM 模板时,顶部添加了意外字符

c# - 如何解决 DbContext 上的此 ASP.NET MVC 数据空构造函数警告?

.net-core - .net core 2 控制台应用程序的独立发布未部署正确版本的 System.Data.SqlClient

c# - 将两个 List<string> 值添加到对象 {get,内部集;} 时出错

c# - EF Core - 添加相关实体时出错

ruby - 我需要将 Bundler 本身添加到 Gemfile 中吗?

android - 无法解析 ':app@debug/compileClasspath' : Could not resolve com. google.firebase :firebase-messaging:17. 1.0 的依赖关系

node.js - npm:如何管理依赖项?

azure - 在为 ADF 创建数据集时,有时我们会导入架构,有时则不会。其背后的原因是什么?