Scrutor icon indicating copy to clipboard operation
Scrutor copied to clipboard

Azure Function InProcess: Could not load file or assembly 'Microsoft.Extensions.DependencyModel

Open EddLonzanida opened this issue 2 years ago • 0 comments

Hi @khellang,

Good job in creating this package! However, i'm getting some errors when using it in Azure Function App - Isolated Process. If you can have a look please?

I've included the screenshot below:

image

Details:

System.IO.FileNotFoundException
  HResult=0x80070002
  Message=Could not load file or assembly 'Microsoft.Extensions.DependencyModel, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.
  Source=Scrutor
  StackTrace:
   at Scrutor.TypeSourceSelector.FromApplicationDependencies(Func`2 predicate) in C:\Visual Studio 2017 Projects\SampleInProcessFunctionApp\Scrutor\TypeSourceSelector.cs:line 55
   at Scrutor.TypeSourceSelector.FromApplicationDependencies() in C:\Visual Studio 2017 Projects\SampleInProcessFunctionApp\Scrutor\TypeSourceSelector.cs:line 40
   at SampleInProcessFunctionApp.Extensions.StartupExtensions.<>c.<RegisterServices>b__0_0(ITypeSourceSelector scan) in C:\Visual Studio 2017 Projects\SampleInProcessFunctionApp\SampleInProcessFunctionApp\Extensions\StartupExtensions.cs:line 16
   at Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions.Scan(IServiceCollection services, Action`1 action) in C:\Visual Studio 2017 Projects\SampleInProcessFunctionApp\Scrutor\ServiceCollectionExtensions.Scanning.cs:line 24
   at SampleInProcessFunctionApp.Extensions.StartupExtensions.RegisterServices(IServiceCollection services) in C:\Visual Studio 2017 Projects\SampleInProcessFunctionApp\SampleInProcessFunctionApp\Extensions\StartupExtensions.cs:line 16
   at SampleInProcessFunctionApp.Startup.Configure(IFunctionsHostBuilder builder) in C:\Visual Studio 2017 Projects\SampleInProcessFunctionApp\SampleInProcessFunctionApp\Startup.cs:line 57
   at Microsoft.Azure.WebJobs.WebJobsBuilderExtensions.ConfigureAndLogUserConfiguredServices(IWebJobsStartup startup, WebJobsBuilderContext context, IWebJobsBuilder builder, ILoggerFactory loggerFactory)
   at Microsoft.Azure.WebJobs.WebJobsBuilderExtensions.UseWebJobsStartup(IWebJobsBuilder builder, Type startupType, WebJobsBuilderContext context, ILoggerFactory loggerFactory)
   at Microsoft.Azure.WebJobs.WebJobsBuilderExtensions.UseExternalStartup(IWebJobsBuilder builder, IWebJobsStartupTypeLocator startupTypeLocator, WebJobsBuilderContext context, ILoggerFactory loggerFactory)
   at Microsoft.Azure.WebJobs.Script.ScriptHostBuilderExtensions.<>c__DisplayClass7_0.<AddScriptHostCore>b__1(HostBuilderContext context, IWebJobsBuilder webJobsBuilder)

EddLonzanida avatar Nov 17 '23 23:11 EddLonzanida