Skip to content

collector-bank/azure-webjobs-sdk-issue-2618

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Purpose of this project

The information provided in this repo is complementary to the issue Azure/azure-webjobs-sdk#2618.

The repo contains an example web job (see subfolder 'webjob') that reproduces a problem (which might be due to conflicting transient dependencies) when using azure webjobs sdk in conjunction with entity framework core and application insights.

The webjob application

The application is a console app with the following dependencies.

error callstack

Error details

An exception is thrown during application startup.

Exception message:

System.MethodAccessException: 'Attempt by method 'Microsoft.Extensions.Logging.Configuration.LoggerProviderConfigurationFactory.GetConfiguration(System.Type)' to access method 'Microsoft.Extensions.Logging.ProviderAliasUtilities.GetAlias(System.Type)' failed.'

Callstack:

This exception was originally thrown at this call stack:
    [External Code]
    WebJobLibrary.WebJobHelper.Run(System.Action<Microsoft.Extensions.DependencyInjection.IServiceCollection>) in WebJobHelper.cs
    [External Code]
    MyWebJob.Program.Main(string[]) in Program.cs
    [External Code]

Visual studio screen shot

error callstack

Key insights

  • The azure web jobs sdk must be wrapped in a library which is referenced from the actual web job
  • Application insights must be initialized

About

Complementary information to issue-2618 in azure webjobs sdk

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages