[azure函数]无法加载文件或汇编' configuration.configurationmanager'
.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 configurations
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
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.
根据您的描述,似乎错过了应用程序内部的nugetpackage 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.