azure-webjobs-sdk: Loader Exceptions

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

About this issue

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

Most upvoted comments

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.

is this issue still not resolved?

It’s still there:

[04/14/2020 17:47:27 > 16a40b: INFO] Warning: Only got partial types from assembly: Microsoft.Azure.WebJobs.Extensions.Storage, Version=3.0.10.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 [04/14/2020 17:47:27 > 16a40b: INFO] The following loader failures occured when trying to load the assembly: [04/14/2020 17:47:27 > 16a40b: INFO] - Method 'Commit' in type 'Microsoft.Azure.WebJobs.Host.Blobs.Bindings.DelegatingCloudBlobStream' from assembly 'Microsoft.Azure.WebJobs.Extensions.Storage, Version=3.0.10.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not have an implementation. [04/14/2020 17:47:27 > 16a40b: INFO] - Method 'Commit' in type 'Microsoft.Azure.WebJobs.Host.Blobs.Bindings.DelegatingCloudBlobStream' from assembly 'Microsoft.Azure.WebJobs.Extensions.Storage, Version=3.0.10.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not have an implementation. [04/14/2020 17:47:27 > 16a40b: INFO] - Method 'Commit' in type 'Microsoft.Azure.WebJobs.Host.Blobs.Bindings.DelegatingCloudBlobStream' from assembly 'Microsoft.Azure.WebJobs.Extensions.Storage, Version=3.0.10.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not have an implementation. [04/14/2020 17:47:27 > 16a40b: INFO] - Method 'Commit' in type 'Microsoft.Azure.WebJobs.Host.Blobs.Bindings.DelegatingCloudBlobStream' from assembly 'Microsoft.Azure.WebJobs.Extensions.Storage, Version=3.0.10.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not have an implementation. [04/14/2020 17:47:27 > 16a40b: INFO] - Could not load type 'Microsoft.WindowsAzure.Storage.Table.TableQuerySegment' from assembly 'Microsoft.WindowsAzure.Storage, Version=9.3.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. [04/14/2020 17:47:27 > 16a40b: INFO] This can occur if the assemblies listed above are missing, outdated or mismatched. [04/14/2020 17:47:27 > 16a40b: INFO] Exception message: System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. [04/14/2020 17:47:27 > 16a40b: INFO] at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) [04/14/2020 17:47:27 > 16a40b: INFO] at System.Reflection.Assembly.GetTypes() [04/14/2020 17:47:27 > 16a40b: INFO] at Microsoft.Azure.WebJobs.Host.Indexers.DefaultTypeLocator.FindTypes(Assembly assembly, IEnumerable1 extensionAssemblies) in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Indexers\DefaultTypeLocator.cs:line 115`

still the same year old issue. Agree with @nicholastic it is very frustrating.

  Warning: Only got partial types from assembly: Microsoft.Azure.WebJobs.Extensions.Storage, Version=3.0.10.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.10.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.10.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.10.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.10.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) in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Indexers\DefaultTypeLocator.cs:line 115

Come on guys, this issue has been outstanding for ages, please fix it. I’ve finally managed to get V3 running (the V3 project templates STILL don’t compile and the documentation to just get up and running isn’t at all clear) and this is what I get:

warn: Host.Startup[0] Warning: Only got partial types from assembly: Microsoft.Azure.WebJobs.Extensions.Storage, Version=3.0.6.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 The following loader failures occured when trying to load the assembly: - Could not load file or assembly ‘System.ComponentModel.Annotations, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The system cannot find the file specified. - Method ‘Commit’ in type ‘Microsoft.Azure.WebJobs.Host.Blobs.Bindings.DelegatingCloudBlobStream’ from assembly ‘Microsoft.Azure.WebJobs.Extensions.Storage, Version=3.0.6.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.6.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.6.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.6.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.RuntimeModule.GetTypes() 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