[英]Azure function failing to run with error Could not load type Microsoft.Azure.WebJobs.ExecutionContext
We have deployed an azure function and it was working fine since last week but it suddenly failed running with error " Could not load type 'Microsoft.Azure.WebJobs.ExecutionContext' from assembly 'Microsoft.Azure.WebJobs.Extensions, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null' ".我们已经部署了一个 azure function,自上周以来它运行良好,但突然运行失败并出现错误“无法从程序集‘Microsoft.Azure.WebJobs.Extensions,版本 = 3.0 加载类型‘Microsoft.Azure.WebJobs.ExecutionContext’。 0.0,文化=中性,PublicKeyToken=null' ”。 When I looked at the azure portal I have identified that the last version has updated to a different version.当我查看 azure 门户网站时,我发现最后一个版本已更新为不同的版本。 Do I need to update Nuget packages and redeploy it again?我是否需要更新 Nuget 包并重新部署它?
This happens because of the version upgrade of Azure SDK by Microsoft 发生这种情况是由于Microsoft对Azure SDK进行了版本升级
To temporarily avoid impact, you can pin your Function App to the previous version of the runtime by updating the app setting FUNCTIONS_EXTENSION_VERSION to 2.0.11961-alpha. 为了暂时避免影响,您可以通过将应用程序设置FUNCTIONS_EXTENSION_VERSION更新为2.0.11961-alpha来将Function App固定到运行时的早期版本。
Permanent fix - Update you " Microsoft.Azure.WebJobs " Nuget package to the version " 3.0.0-rc1 " or higher. 永久修复 -将您的“ Microsoft.Azure.WebJobs ” Nuget软件包更新为“ 3.0.0-rc1 ”或更高版本。 Also update " Microsoft.NET.Sdk.Functions " to the version " 1.0.21 " or higher. 还要将“ Microsoft.NET.Sdk.Functions ”更新到“ 1.0.21 ”或更高版本。 Rebuild and test it locally and deploy to azure. 在本地重建和测试它并部署到天蓝色。
Please find the discussions on permanent fix here- https://github.com/Azure/app-service-announcements/issues/129 请在此处找到有关永久修复的讨论-https ://github.com/Azure/app-service-announcements/issues/129
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.