Azure WebJobs NuGet包错误

Azure WebJobs NuGet包错误,azure,azure-storage,azure-webjobs,Azure,Azure Storage,Azure Webjobs,我想知道是否有人在VisualStudio模板上的Azure WebJobs队列示例上遇到运行错误 在我更新了NuGet manager上的所有软件包之后,运行要发布的示例 这是错误消息: System.InvalidOperationException HResult=0x80131509 Message=Microsoft.WindowsAzure.Storage is deployed incorrectly. Are you missing a Table Service ass

我想知道是否有人在VisualStudio模板上的Azure WebJobs队列示例上遇到运行错误

在我更新了NuGet manager上的所有软件包之后,运行要发布的示例

这是错误消息:

System.InvalidOperationException
  HResult=0x80131509
  Message=Microsoft.WindowsAzure.Storage is deployed incorrectly. Are you missing a Table Service assembly (Microsoft.Data.Services.Client, Microsoft.Data.OData or Microsoft.Data.Edm) or a related binding redirect?
  Source=Microsoft.Azure.WebJobs.Host
  StackTrace:
   at Microsoft.Azure.WebJobs.Host.AzureStorageDeploymentValidator.Validate()
   at Microsoft.Azure.WebJobs.Host.Executors.JobHostConfigurationExtensions.CreateStaticServices(JobHostConfiguration config)
   at Microsoft.Azure.WebJobs.JobHost.InitializeServices()
   at Microsoft.Azure.WebJobs.JobHost.<InitializeHostAsync>d__44.MoveNext()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Azure.WebJobs.JobHost.<StartAsyncCore>d__25.MoveNext()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Azure.WebJobs.JobHost.Start()
   at Microsoft.Azure.WebJobs.JobHost.RunAndBlock()
   at QueueSample.Program.Main() in C:\Users\adity\Documents\Visual Studio 2017\Projects\AzureQueueStorage\QueueSample\Program.cs:line 28

Inner Exception 1:
TypeLoadException: Could not load type 'Microsoft.WindowsAzure.Storage.Table.DataServices.TableServiceContext' from assembly 'Microsoft.WindowsAzure.Storage, Version=9.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
System.invalidoOperationException
HResult=0x80131509
Message=Microsoft.WindowsAzure.Storage未正确部署。是否缺少表服务程序集(Microsoft.Data.Services.Client、Microsoft.Data.OData或Microsoft.Data.Edm)或相关的绑定重定向?
Source=Microsoft.Azure.WebJobs.Host
堆栈跟踪:
位于Microsoft.Azure.WebJobs.Host.AzureStorageDeploymentValidator.Validate()上
位于Microsoft.Azure.WebJobs.Host.Executors.JobHostConfigurationExtensions.CreateStaticServices(JobHostConfiguration配置)
在Microsoft.Azure.WebJobs.JobHost.InitializeServices()上
在Microsoft.Azure.WebJobs.JobHost.d_u44.MoveNext()上
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务任务)
在System.Runtime.CompilerServices.TaskWaiter.HandleNonSuccessAndDebuggerNotification(任务任务)中
在Microsoft.Azure.WebJobs.JobHost.d_u25.MoveNext()上
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务任务)
在System.Runtime.CompilerServices.TaskWaiter.HandleNonSuccessAndDebuggerNotification(任务任务)中
在Microsoft.Azure.WebJobs.JobHost.Start()上
在Microsoft.Azure.WebJobs.JobHost.RunAndBlock()上
在C:\Users\adity\Documents\Visual Studio 2017\Projects\AzureQueueStorage\QueueSample\Program.cs中的QueueSample.Program.Main()处:第28行
内部异常1:
TypeLoadException:无法从程序集“Microsoft.WindowsAzure.Storage,Version=9.1.0.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35”加载类型“Microsoft.WindowsAzure.Storage.Table.DataServices.TableServiceContext”。
以下是已安装软件包的列表:

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="Microsoft.Azure.KeyVault.Core" version="2.0.4" targetFramework="net461" />
  <package id="Microsoft.Azure.WebJobs" version="2.1.0" targetFramework="net461" />
  <package id="Microsoft.Azure.WebJobs.Core" version="2.1.0" targetFramework="net461" />
  <package id="Microsoft.Data.Edm" version="5.8.3" targetFramework="net461" />
  <package id="Microsoft.Data.OData" version="5.8.3" targetFramework="net461" />
  <package id="Microsoft.Data.Services.Client" version="5.8.3" targetFramework="net461" />
  <package id="Microsoft.Extensions.Logging.Abstractions" version="2.0.0" targetFramework="net461" />
  <package id="Microsoft.NETCore.Platforms" version="2.0.1" targetFramework="net461" />
  <package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="net461" />
  <package id="Microsoft.WindowsAzure.ConfigurationManager" version="3.2.3" targetFramework="net461" />
  <package id="NETStandard.Library" version="2.0.1" targetFramework="net461" />
  <package id="Newtonsoft.Json" version="11.0.1" targetFramework="net461" />
  <package id="System.AppContext" version="4.3.0" targetFramework="net461" />
  <package id="System.Collections" version="4.3.0" targetFramework="net461" />
  <package id="System.Collections.Concurrent" version="4.3.0" targetFramework="net461" />
  <package id="System.Console" version="4.3.0" targetFramework="net461" />
  <package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="net461" />
  <package id="System.Diagnostics.DiagnosticSource" version="4.4.1" targetFramework="net461" />
  <package id="System.Diagnostics.Tools" version="4.3.0" targetFramework="net461" />
  <package id="System.Diagnostics.Tracing" version="4.3.0" targetFramework="net461" />
  <package id="System.Globalization" version="4.3.0" targetFramework="net461" />
  <package id="System.Globalization.Calendars" version="4.3.0" targetFramework="net461" />
  <package id="System.IO" version="4.3.0" targetFramework="net461" />
  <package id="System.IO.Compression" version="4.3.0" targetFramework="net461" />
  <package id="System.IO.Compression.ZipFile" version="4.3.0" targetFramework="net461" />
  <package id="System.IO.FileSystem" version="4.3.0" targetFramework="net461" />
  <package id="System.IO.FileSystem.Primitives" version="4.3.0" targetFramework="net461" />
  <package id="System.Linq" version="4.3.0" targetFramework="net461" />
  <package id="System.Linq.Expressions" version="4.3.0" targetFramework="net461" />
  <package id="System.Net.Http" version="4.3.3" targetFramework="net461" />
  <package id="System.Net.Primitives" version="4.3.0" targetFramework="net461" />
  <package id="System.Net.Sockets" version="4.3.0" targetFramework="net461" />
  <package id="System.ObjectModel" version="4.3.0" targetFramework="net461" />
  <package id="System.Reflection" version="4.3.0" targetFramework="net461" />
  <package id="System.Reflection.Extensions" version="4.3.0" targetFramework="net461" />
  <package id="System.Reflection.Primitives" version="4.3.0" targetFramework="net461" />
  <package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="net461" />
  <package id="System.Runtime" version="4.3.0" targetFramework="net461" />
  <package id="System.Runtime.Extensions" version="4.3.0" targetFramework="net461" />
  <package id="System.Runtime.Handles" version="4.3.0" targetFramework="net461" />
  <package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net461" />
  <package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net461" />
  <package id="System.Runtime.Numerics" version="4.3.0" targetFramework="net461" />
  <package id="System.Security.Cryptography.Algorithms" version="4.3.1" targetFramework="net461" />
  <package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net461" />
  <package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net461" />
  <package id="System.Security.Cryptography.X509Certificates" version="4.3.2" targetFramework="net461" />
  <package id="System.Spatial" version="5.8.3" targetFramework="net461" />
  <package id="System.Text.Encoding" version="4.3.0" targetFramework="net461" />
  <package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="net461" />
  <package id="System.Text.RegularExpressions" version="4.3.0" targetFramework="net461" />
  <package id="System.Threading" version="4.3.0" targetFramework="net461" />
  <package id="System.Threading.Tasks" version="4.3.0" targetFramework="net461" />
  <package id="System.Threading.Timer" version="4.3.0" targetFramework="net461" />
  <package id="System.Xml.ReaderWriter" version="4.3.1" targetFramework="net461" />
  <package id="System.Xml.XDocument" version="4.3.0" targetFramework="net461" />
  <package id="WindowsAzure.Storage" version="9.1.0" targetFramework="net461" />
</packages>

当我使用默认模板和包时,它运行时没有错误。 在我更新了NuGet软件包之后,它运行的错误如上所述

多谢各位

Message=Microsoft.WindowsAzure.Storage部署不正确

TypeLoadException:无法从程序集“Microsoft.WindowsAzure.Storage,Version=9.1.0.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35”加载类型“Microsoft.WindowsAzure.Storage.Table.DataServices.TableServiceContext”

根据您的错误消息,我想问题可能与兼容性有关


自版本4.0以来,TableServiceContext已被弃用,并在版本9.0中作为删除OData依赖项的一部分被删除。您最好对软件包(如WindowsAzure.Storage 8.7.0)使用兼容版本。有关此问题的更多详细信息,请阅读。

我的问题是我有一个过时的nuget软件包。我尝试卸载nuget软件包,发现它的依赖项,并从中升级

Microsoft.Azure.WebJobs,版本=2.0.0.0

Microsoft.Azure.WebJobs,版本=2.2.0.0