Error building configuration in an external startup class. Getting the below error while upgrading Function app from 3.x to 4.x . Even though all the packages are upgraded to latest versions asked getting the same error

VikasRajareddy-9365 26 Reputation points
2024-03-19T14:11:26.9033333+00:00

Microsoft.Azure.WebJobs.Script.ExternalStartupException : Error building configuration in an external startup class. ---> Microsoft.Azure.WebJobs.Script.HostInitializationException : One or more loaded extensions do not meet the minimum requirements. For more information see https://aka.ms/func-min-extension-versions. ExtensionStartupType EventHubsWebJobsStartup from assembly 'Microsoft.Azure.WebJobs.EventHubs, Version=4.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not meet the required minimum version of 4.3.0.0. Update your NuGet package reference for Microsoft.Azure.WebJobs.Extensions.EventHubs to 4.3.0 or later. ExtensionStartupType AzureStorageWebJobsStartup from assembly 'Microsoft.Azure.WebJobs.Extensions.Storage, Version=3.0.10.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not meet the required minimum version of 4.0.4.0. Update your NuGet package reference for Microsoft.Azure.WebJobs.Extensions.Storage to 4.0.4 or later. ExtensionStartupType ServiceBusWebJobsStartup from assembly 'Microsoft.Azure.WebJobs.ServiceBus, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not meet the required minimum version of 4.2.1.0. Update your NuGet package reference for Microsoft.Azure.WebJobs.Extensions.ServiceBus to 4.2.1 or later. at Microsoft.Azure.WebJobs.Script.DependencyInjection.ScriptStartupTypeLocator.ValidateExtensionRequirements(List1 startupTypes) at /_/src/WebJobs.Script/DependencyInjection/ScriptStartupTypeLocator.cs : 336 at async Microsoft.Azure.WebJobs.Script.DependencyInjection.ScriptStartupTypeLocator.GetExtensionsStartupTypesAsync() at /_/src/WebJobs.Script/DependencyInjection/ScriptStartupTypeLocator.cs : 222 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.Azure.WebJobs.Script.DependencyInjection.ScriptStartupTypeLocator.<.ctor>b__10_0() at /_/src/WebJobs.Script/DependencyInjection/ScriptStartupTypeLocator.cs : 53 at System.Lazy1.ViaFactory(LazyThreadSafetyMode mode) at System.Lazy1.ExecutionAndPublication(LazyHelper executionAndPublication,Boolean useDefaultConstructor) at System.Lazy1.CreateValue() at System.Lazy`1.get_Value() at Microsoft.Azure.WebJobs.Script.DependencyInjection.ScriptStartupTypeLocator.GetStartupTypes() at //src/WebJobs.Script/DependencyInjection/ScriptStartupTypeLocator.cs : 68 at Microsoft.Azure.WebJobs.WebJobsBuilderExtensions.UseExternalConfigurationStartup(IWebJobsConfigurationBuilder builder,IWebJobsStartupTypeLocator startupTypeLocator,WebJobsBuilderContext context,ILoggerFactory loggerFactory) at D:\a_work\1\s\src\Microsoft.Azure.WebJobs.Host\Hosting\WebJobsBuilderExtensions.cs : 362 at Microsoft.Azure.WebJobs.Script.ScriptHostBuilderExtensions.<>c__DisplayClass7_3.<AddScriptHostCore>b__8(IWebJobsStartupTypeLocator locator) at //src/WebJobs.Script/ScriptHostBuilderExtensions.cs : 258 End of inner exception

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,181 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 25,396 Reputation points Microsoft Employee
    2024-03-20T00:34:15.8166667+00:00

    Hi @Vikas Rajareddy

    Just to confirm, you've updated all your extensions to a version (or higher) listed below:

    Check Extension Minimum Version
    ✔️ Microsoft.Azure.WebJobs.Extensions.Storage 4.0.4
    ✔️ Microsoft.Azure.WebJobs.Extensions.ServiceBus 4.2.1
    ✔️ Microsoft.Azure.WebJobs.Extensions.EventHubs 4.3.0
    Microsoft.Azure.WebJobs.Extensions.DurableTask 2.4.1
    Microsoft.Azure.WebJobs.Extensions.CosmosDB 3.0.9
    Microsoft.Azure.WebJobs.Extensions.EventGrid 2.1.0
    Microsoft.Azure.WebJobs.Extensions.RabbitMQ 1.0.0
    Microsoft.Azure.WebJobs.Extensions.Kafka 3.2.1

    According to the exception, it's loading versions lower than what's required. I would check your nuget references by inspecting packages.config or <PackageReference/> in the csproj. At the solution level, if you have mismatched versions, this could cause an issue. You may have binding redirects that's not pointing the correct version.