因此,我们一直喜欢有关函数的一切,除了我们必须将某些库保留为 Azure Functions,例如更新某些库的想法。 Microsoft.Owin 就是其中之一。我们很乐意使用版本 4。
Could not load file or assembly 'Microsoft.Owin, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
我已经尝试了一切,例如通过 Project.json 进行强制以及在整个解决方案中进行整合。在VS中本地调试也会出现同样的错误。所以部署以及本地都会发生这种情况。
我们在其他库(例如 AMQP)中也遇到了类似的问题。
我们也运行最新的 SDK - Microsoft.NET.SDK.Functions 版本 1.0.13
最佳答案
以下问题可能重复。
Azure Functions - Could not load file or assembly ''Microsoft.WindowsAzure.Storage'
尝试查找 Owin 是否是 Azure 函数的 native 库。如果有的话可以直接引用。 #r“库.Namspace”。否则,您需要遵循上述线程中的建议。
关于c# - Azure函数 "Could not load file or assembly",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50152658/