简体   繁体   English

Azure function 无法运行,出现错误无法加载类型 Microsoft.Azure.WebJobs.ExecutionContext

[英]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

Changing Platform from 32 Bit to 64 Bit fixed this issue for me.Platform32 Bit更改为64 Bit为我解决了这个问题。 在此处输入图像描述

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Azure Function 停止工作 - 无法加载类型“Microsoft.Azure.WebJobs.BlobTriggerAttribute” - Azure Function stopped working - Could not load type 'Microsoft.Azure.WebJobs.BlobTriggerAttribute' v2 Function 无法加载类型“Microsoft.Azure.WebJobs.QueueTriggerAttribute” - v2 Function Could not load type 'Microsoft.Azure.WebJobs.QueueTriggerAttribute' 无法从程序集“Microsoft.Azure.WebJobs.Host”加载类型“Microsoft.Azure.WebJobs.Host.Scale.ConcurrencyManager” - Could not load type 'Microsoft.Azure.WebJobs.Host.Scale.ConcurrencyManager' from assembly 'Microsoft.Azure.WebJobs.Host 在 Azure Webjobs 中运行 Python 脚本 - Run Python script in Azure Webjobs Azure 886982359588 应用程序:Microsoft.Azure.WebJobs.EventHubs:值不能为 null。(参数“receiverConnectionString”) - Azure Function app : Microsoft.Azure.WebJobs.EventHubs: Value cannot be null. (Parameter 'receiverConnectionString') 将 Azure Function 的框架从 3.1 更新到 5 将引发此错误“无法加载文件或程序集 Microsoft.Extensions.Configuration.Abstractio - Update Framework from 3.1 to 5 for Azure Function will raise this error "Could not load file or assembly Microsoft.Extensions.Configuration.Abstractio 我在 azure 存储资源管理器中没有“azure-webjobs-hosts”容器,因此我的 azure function 应用程序将无法运行 - I don't have a 'azure-webjobs-hosts' container in azure storage explorer, therefore my azure function app will not run Azure Function V3 无法加载文件或程序集 'Microsoft.Extensions.DependencyModel,版本 = 3.1.6.0 - Azure Function V3 Could not load file or assembly 'Microsoft.Extensions.DependencyModel, Version=3.1.6.0 Azure Runbook 错误:无法加载文件或程序集“Microsoft.SqlServer.BatchParser.dll” - Azure Runbook Error: Could not load file or assembly 'Microsoft.SqlServer.BatchParser.dll' 将我的 Azure Function 从 .net Core 3.1 升级到 .net Core 7.0。 错误“'无法加载文件或程序集'Microsoft.Extensions.Configuration.Abstraction - Upgrade my Azure Function from .net Core 3.1 to .net Core 7.0. Error "'Could not load file or assembly 'Microsoft.Extensions.Configuration.Abstraction
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM