c# - 警告 : Only got partial types from assembly: Microsoft. Azure.WebJobs.Extensions.Storage

标签 c# asp.net azure azure-webjobs azure-webjobssdk

我有一个简单的 .NET V3 WebJob,带有计时器触发器,并在 .NET 网站中运行,如本答案所述:Scheduled .NET WebJob V3 example

但是,在输出中,我收到此警告:

警告:Host.Startup[0] 警告:仅从程序集中获取部分类型:Microsoft.Azure.WebJobs.Extensions.Storage,Version=3.0.6.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35 尝试加载程序集时发生以下加载器故障: - 无法加载文件或程序集“System.ComponentModel.Annotations,Version=4.2.1.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a”或其依赖项之一。该系统找不到指定的文件。 -程序集“Microsoft.Azure.WebJobs.Extensions.Storage,Version=3.0.6.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35”中类型“Microsoft.Azure.WebJobs.Host.Blobs.Bindings.DelegatingCloudBlobStream”中的方法“Commit”确实如此没有实现。 -程序集“Microsoft.Azure.WebJobs.Extensions.Storage,Version=3.0.6.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35”中类型“Microsoft.Azure.WebJobs.Host.Blobs.Bindings.DelegatingCloudBlobStream”中的方法“Commit”确实如此没有实现。 -程序集“Microsoft.Azure.WebJobs.Extensions.Storage,Version=3.0.6.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35”中类型“Microsoft.Azure.WebJobs.Host.Blobs.Bindings.DelegatingCloudBlobStream”中的方法“Commit”确实如此没有实现。 -程序集“Microsoft.Azure.WebJobs.Extensions.Storage,Version=3.0.6.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35”中类型“Microsoft.Azure.WebJobs.Host.Blobs.Bindings.DelegatingCloudBlobStream”中的方法“Commit”确实如此没有实现。 - 无法从程序集“Microsoft.WindowsAzure.Storage,Version=9.3.2.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35”加载类型“Microsoft.WindowsAzure.Storage.Table.TableQuerySegment”。 如果上面列出的程序集丢失、过时或不匹配,则可能会发生这种情况。 异常消息:System.Reflection.ReflectionTypeLoadException:无法加载一种或多种请求的类型。检索 LoaderExceptions 属性以获取更多信息。 在 System.Reflection.RuntimeModule.GetTypes(RuntimeModule 模块) 在 System.Reflection.RuntimeModule.GetTypes() 在 System.Reflection.Assembly.GetTypes() 在 C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Indexers\DefaultTypeLocator 中的 Microsoft.Azure.WebJobs.Host.Indexers.DefaultTypeLocator.FindTypes(Assembly assembly, IEnumerable`1 extensionAssemblies) .cs:第115行

这是 GitHub 上的一个未决问题 ( https://github.com/Azure/azure-webjobs-sdk/issues/2060 )。有人解决了吗?

更重要的是,它是否会以任何方式影响功能? GitHub 问题 OP 说不,但最好有人确认这一点。

最佳答案

安装包"Microsoft.Azure.WebJobs.Host.Storage" Version="4.1.0"修复此错误。

此外,为了避免任何困惑,在我修复此问题之前,由于软件包更新,原始问题中的错误消息已变为以下内容:

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

关于c# - 警告 : Only got partial types from assembly: Microsoft. Azure.WebJobs.Extensions.Storage,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57281474/

相关文章:

c# - ASP MVC.NET - 如何绑定(bind) KeyValuePair?

c# - 为接口(interface)属性提供一个重要的 setter,但不是 getter

c# - 单声道/Xamarin WebApi2?

asp.net - 在mvc5中获取复选框值

rest - Azure Maps 获取 map 图像请求返回空白 map 图像

c# - 从匹配两个单独的 List<T> 中获取 List<T>

c# - Visual Studio 中的折叠区域

asp.net - 控制对表单字段的访问的最佳实践

azure - 无法在本地运行 Azure ML 模型,有关输入脚本的帮助

azure - 通过azure逻辑应用程序通知slack中的@channel