[azure函数]无法加载文件或汇编' configuration.configurationmanager'

发布于 2025-02-07 19:35:12 字数 542 浏览 2 评论 0原文

.NET CORE 3.1。我使用了system.runtime.caching库,它取决于system.configuration.configurationmanager。

但是发生了一件了不起的事情,我在MS单元测试项目[.NET Core 3.1]中对其进行了测试,它运行良好,然后在Azure功能项目[.NET Core 3.1]中,它将抛出“无法加载文件或汇编” system.configuration.configurationManager,版本= 6.0.0.0,culture =中性,publicKeyToken = cc7b13ffcd2dddddd51'。该系统找不到指定的文件。错误,在项目.deps.json中,还具有依赖性配置

​noreferrer“> ”

.Net Core 3.1. I used System.Runtime.Caching library, it depends on System.Configuration.ConfigurationManager.

But there is a amazing thing happened, I test it in MS unit test project[.NET Core 3.1], it runs well, then in Azure Function project[.NET Core 3.1], it will throw 'Could not load file or assembly 'System.Configuration.ConfigurationManager, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.' error, and in project .deps.json, also have dependency configurationsenter image description here

Below is Stack Trace:enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

无法回应 2025-02-14 19:35:13

system.configuration.configurationManager 6.0不支持.NET SDK 3.1,因此请更新“ System.Configuration.configurationManager”版本,为4.7.0和任何其他较低版本。并尝试。

System.Configuration.ConfigurationManager 6.0 won't support .net SDK 3.1, so update the "System.Configuration.ConfigurationManager" version to 4.7.0 and any other lower version. and try it.

野稚 2025-02-14 19:35:13

根据您的描述,似乎错过了应用程序内部的nugetpackage system.configuration.configurationmanager。

我建议您可以在本地内安装软件包系统。

Install-Package System.Configuration.ConfigurationManager 

According to your description, it seems it missed the nugetpackage System.Configuration.ConfigurationManager inside your application.

I suggest you could install the package System.Configuration.ConfigurationManager inside the local and re-publish again.

Install-Package System.Configuration.ConfigurationManager 
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文