我们经常遇到断断续续的问题,即持久功能在闲置后无法启动(消耗计划)。
查看日志,我们发现它涉及DI问题和/或无法从以下位置开始:
ScriptStartupTypeLocator.cs
这里的开发人员不太高兴,我们正在努力诊断问题!任何MS文档中都没有细节,也没有关于该问题的许多报告。
下面的完整跟踪:
System.IO.FileLoadException : Assembly with same name is already loaded
at System.Runtime.Loader.AssemblyLoadContext.LoadFromPath(IntPtr ptrNativeAssemblyLoadContext,String ilPath,String niPath,ObjectHandleOnStack retAssembly)
at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath)
at Microsoft.Azure.WebJobs.Script.DependencyInjection.ScriptStartupTypeLocator.<>c__DisplayClass9_1.b__0(AssemblyName assemblyName) at C:\azure-webjobs-sdk-script\src\WebJobs.Script\DependencyInjection\ScriptStartupTypeLocator.cs : 116
at System.TypeNameParser.ResolveAssembly(String asmName,Func`2 assemblyResolver,Boolean throwOnError,StackCrawlMark& stackMark)
at System.TypeNameParser.ConstructType(Func`2 assemblyResolver,Func`4 typeResolver,Boolean throwOnError,Boolean ignoreCase,StackCrawlMark& stackMark)
at System.TypeNameParser.GetType(String typeName,Func`2 assemblyResolver,Func`4 typeResolver,Boolean throwOnError,Boolean ignoreCase,StackCrawlMark& stackMark)
at System.Type.GetType(String typeName,Func`2 assemblyResolver,Func`4 typeResolver,Boolean throwOnError,Boolean ignoreCase)
at async Microsoft.Azure.WebJobs.Script.DependencyInjection.ScriptStartupTypeLocator.GetExtensionsStartupTypesAsync() at C:\azure-webjobs-sdk-script\src\WebJobs.Script\DependencyInjection\ScriptStartupTypeLocator.cs : 113
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.Azure.WebJobs.Script.DependencyInjection.ScriptStartupTypeLocator.GetStartupTypes() at C:\azure-webjobs-sdk-script\src\WebJobs.Script\DependencyInjection\ScriptStartupTypeLocator.cs : 55
at Microsoft.Azure.WebJobs.WebJobsBuilderExtensions.UseExternalStartup(IWebJobsBuilder builder,IWebJobsStartupTypeLocator startupTypeLocator,ILoggerFactory loggerFactory) at C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Hosting\WebJobsBuilderExtensions.cs : 167
at Microsoft.Azure.WebJobs.Script.ScriptHostBuilderExtensions.UseScriptExternalStartup(IWebJobsBuilder builder,ScriptApplicationHostOptions applicationHostOptions,ILoggerFactory loggerFactory,IExtensionBundleManager extensionBundleManager,IMetricsLogger metricsLogger) at C:\azure-webjobs-sdk-script\src\WebJobs.Script\ScriptHostBuilderExtensions.cs : 237
at Microsoft.Azure.WebJobs.Script.ScriptHostBuilderExtensions.<>c__DisplayClass3_0.b__0(HostBuilderContext context,IWebJobsBuilder webJobsBuilder) at C:\azure-webjobs-sdk-script\src\WebJobs.Script\ScriptHostBuilderExtensions.cs : 114
at Microsoft.Extensions.Hosting.WebJobsHostBuilderExtensions.<>c__DisplayClass4_0.b__1(HostBuilderContext context,IServiceCollection services) at C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Hosting\WebJobsHostBuilderExtensions.cs : 47
at Microsoft.Extensions.Hosting.HostBuilder.CreateServiceProvider()
at Microsoft.Extensions.Hosting.HostBuilder.Build()
at Microsoft.Azure.WebJobs.Script.WebHost.DefaultScriptHostBuilder.BuildHost(Boolean skipHostStartup,Boolean skipHostConfigurationParsing) at C:\azure-webjobs-sdk-script\src\WebJobs.Script.WebHost\DefaultScriptHostBuilder.cs : 59
at async Microsoft.Azure.WebJobs.Script.WebHost.WebJobsScriptHostService.UnsynchronizedStartHostAsync(ScriptHostStartupOperation activeOperation,Int32 attemptCount,JobHostStartupMode startupMode) at C:\azure-webjobs-sdk-script\src\WebJobs.Script.WebHost\WebJobsScriptHostService.cs : 234
任何帮助都会超级有帮助。
//进一步调查
最终通过应用洞察力找到了更多详细信息:
消息:
Method not found: 'Void DurableTask.AzureStorage.AzureStorageOrchestrationServiceSettings.set_FetchLargeMessageDataEnabled(Boolean)'.
失败的方法:
DryIoc.Microsoft.DependencyInjection.DryIocAdapter+<>c__DisplayClass3_0.<RegisterDescriptor>b__0
考虑到上述情况,似乎内置的IoC容器无法注册?