c# - 无法在 Azure 函数中加载程序集或 dll System.Buffers,Version=4.0.2.0

标签 c# asp.net-web-api runtime azure-functions assembly-binding-redirect

我有一个 Web API 应用程序,添加了 System.buffer reference 4.0.3.0.

当我们从同一解决方案的另一个项目调用该项目时,它工作正常。

但是当我在 Azure 函数中引用此项目引用时 - 它抛出以下错误。

enter image description here

enter image description here

我曾尝试通过更改版本来进行更改,但没有成功。

在 Azure 函数中,我们只是引用项目。

<TargetFramework>net462</TargetFramework>

最佳答案

Azure Functions 1.x 运行时不支持绑定(bind)重定向 (github issue)。

基于 this answer,我最终自己编写了应用绑定(bind)重定向的代码。 .

关于c# - 无法在 Azure 函数中加载程序集或 dll System.Buffers,Version=4.0.2.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55646297/

相关文章:

regex - 制作正则表达式以精确匹配两个字符串单词

c++ - 在运行时更改应用程序的逻辑

c# - 杀死单一服务

c# - 当参数直接定义为方法参数而不是模型时,IHttpActionResult 结果无法绑定(bind)请求正文参数

asp.net-mvc-4 - WebAPI 请求格式的异常

C++ 在运行时分配一个 const 值?

Delphi TChromium CEF3 运行时创建的浏览器加载页面不正确

c# - 如何使用 MySQL Reader 处理空日期时间

c# - 如何在MVC中从Controller动态创建多个ActionLink?

c# - 我的 Windows 窗体项目上的 Media Player 经典库