我的 Web 应用程序在本地主机上运行良好,但是当我将其发布到 Azure 上时,出现以下错误:
Could not load file or assembly 'System.IdentityModel.Tokens.Jwt' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
在本地主机上工作正常。
我使用的是4.5框架,它也在web.config文件中定义。我尝试在 nuget 管理器中重新安装它,但我得到 p>
Package 'System.IdentityModel.Tokens.Jwt.4.0.2.206221351' already exists in project 'project1'
我也无法在引用文件夹中找到此程序集。 这是我第一次遇到此类问题。
你建议我做什么?
问候, 桑迪
最佳答案
Azure Functions 主机中存在一个已知问题:https://github.com/Azure/azure-functions-host/issues/5894
当前的解决方法是将以下内容添加到您的 .csproj:
<PropertyGroup>
<_FunctionsSkipCleanOutput>true</_FunctionsSkipCleanOutput>
</PropertyGroup>
关于asp.net-mvc - 在 Azure 上部署后无法加载文件或程序集“System.IdentityModel.Tokens.Jwt”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36687538/