[英]Use .Net Framework dll (v4.7.2) in .Net Core project
The .Net Framework dll which I am using gets included in the .Net core project(Azure Functions v2) perfectly fine but at runtime it gives error "我正在使用的 .Net Framework dll 包含在 .Net 核心项目(Azure Functions v2)中非常好,但在运行时它给出了错误“
System.Runtime.Caching: Could not load file or assembly 'System.Configuration.ConfigurationManager".
System.Runtime.Caching:无法加载文件或程序集“System.Configuration.ConfigurationManager”。
I tried including it via Nuget.我尝试通过 Nuget 包含它。 Still not working.
还是行不通。 The external dll which I am trying to use which is in .Net Framework seems to use Configuration Manager.
我试图在 .Net Framework 中使用的外部 dll 似乎使用了配置管理器。 Is there any workaround to make it work?
有什么解决方法可以使它工作吗?
Tried using .Net Standard and included the Framwork dll, still getting the same error尝试使用 .Net Standard 并包含 Framwork dll,仍然出现相同的错误
您是否在应用程序中引用了System.Configuration
或System
?
Looks like you are using some packages based on .NetFramework?看起来您正在使用一些基于 .NetFramework 的软件包? The problem should comes from they based on ConfigurationManager.
问题应该来自他们基于ConfigurationManager。 Azure function v2 and later version didn't support ConfigurationManager any more.
Azure 函数 v2 及更高版本不再支持 ConfigurationManager。 If you want to use those package, you can use azure function v1 instead of function v2.
如果要使用这些包,可以使用 azure 函数 v1 而不是函数 v2。
Or you can show the .csproj file in your question.或者您可以在问题中显示 .csproj 文件。 Those package maybe too old and have another version that works on .Net Core.
这些包可能太旧了,并且有另一个可以在 .Net Core 上运行的版本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.