question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Loader Exceptions

See original GitHub issue

We have a webjob using v3 of Webjobs SDK and the target framework is set to net462 .

couple of webjob are based on TimerTrigger while others are based on QueueTrigger

When it starts we seeing the below warnings/exceptions for loading

Warning: Only got partial types from assembly: Microsoft.Azure.WebJobs.Extensions.Storage, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 The following loader failures occured when trying to load the assembly:

  • Method ‘Commit’ in type ‘Microsoft.Azure.WebJobs.Host.Blobs.Bindings.DelegatingCloudBlobStream’ from assembly ‘Microsoft.Azure.WebJobs.Extensions.Storage, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ does not have an implementation.
  • Method ‘Commit’ in type ‘Microsoft.Azure.WebJobs.Host.Blobs.Bindings.DelegatingCloudBlobStream’ from assembly ‘Microsoft.Azure.WebJobs.Extensions.Storage, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ does not have an implementation.
  • Method ‘Commit’ in type ‘Microsoft.Azure.WebJobs.Host.Blobs.Bindings.DelegatingCloudBlobStream’ from assembly ‘Microsoft.Azure.WebJobs.Extensions.Storage, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ does not have an implementation.
  • Method ‘Commit’ in type ‘Microsoft.Azure.WebJobs.Host.Blobs.Bindings.DelegatingCloudBlobStream’ from assembly ‘Microsoft.Azure.WebJobs.Extensions.Storage, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ does not have an implementation.
  • Could not load type ‘Microsoft.WindowsAzure.Storage.Table.TableQuerySegment’ from assembly ‘Microsoft.WindowsAzure.Storage, Version=9.3.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’. This can occur if the assemblies listed above are missing, outdated or mismatched. Exception message: System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) at System.Reflection.Assembly.GetTypes() at Microsoft.Azure.WebJobs.Host.Indexers.DefaultTypeLocator.FindTypes(Assembly assembly, IEnumerable`1 extensionAssemblies)

There seems to be a similar issue #1493 already listed but the assembly name differ from the one in my case.However this is marked closed.

The project has following references.

<PackageReference Include="Microsoft.Azure.WebJobs" Version="3.0.2" /> <PackageReference Include="Microsoft.Azure.WebJobs.Extensions" Version="3.0.1" /> <PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="3.0.1" /> <PackageReference Include="Microsoft.Azure.WebJobs.Host.Storage" Version="3.0.2" /> <PackageReference Include="Microsoft.Azure.WebJobs.Logging.ApplicationInsights" Version="3.0.2" /> <PackageReference Include="Microsoft.Extensions.Configuration" Version="2.1.1" /> <PackageReference Include="Microsoft.IdentityModel.Clients.ActiveDirectory" Version="4.4.0" /> <PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="2.1.1" /> <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.1.1" /> <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.1.1" /> <PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.5.1" /> <PackageReference Include="Microsoft.ApplicationInsights" Version="2.8.1" /> <PackageReference Include="Microsoft.Extensions.Logging.Console" Version="2.1.1" /> <PackageReference Include="StyleCop.Analyzers" Version="1.1.0-beta004" />

is there a way that the warning/exception can be resolved ? Does not affect the functionality in any way

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:6
  • Comments:24 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
nicholasticcommented, Sep 19, 2022

Install package “Microsoft.Azure.WebJobs.Host.Storage” Version=“4.1.0” to fix this warning.

I used to get the warning originally posted in this issue, but with package updates it became:

warn: Host.Startup[0] Warning: Only got partial types from assembly: Microsoft.Azure.WebJobs.Host.Storage, Version=4.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 The following loader failures occured when trying to load the assembly: - Method ‘LogFunctionStarted’ in type ‘WebJobs.Host.Storage.Logging.PersistentQueueLogger’ from assembly ‘Microsoft.Azure.WebJobs.Host.Storage, Version=4.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ does not have an implementation. This can occur if the assemblies listed above are missing, outdated or mismatched. Exception message: System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) at System.Reflection.Assembly.GetTypes() at Microsoft.Azure.WebJobs.Host.Indexers.DefaultTypeLocator.FindTypes(Assembly assembly, IEnumerable`1 extensionAssemblies) in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Indexers\DefaultTypeLocator.cs:line 115

The new package resolves this warning.

2reactions
rickdtullycommented, Mar 2, 2020

is this issue still not resolved?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to retrieve the LoaderException property?
Not all Exceptions have the LoaderExceptions property. Make sure you are casting or catching an exception of the appropriate type. – Suncat2000.
Read more >
ReflectionTypeLoadException.LoaderExceptions Property
The LoaderExceptions property retrieves an array of type Exception that is parallel to the Types array. This array will contain null values whenever ......
Read more >
"Unable to load one or more of the requested types. Retrieve ...
Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. Steps to Reproduce.
Read more >
Class loading exceptions
A class cast exception results when the following conditions exist and can ... The class loader that loaded the source object (class) is...
Read more >
Retrieve the LoaderExceptions property for more information
Exception message: System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found