gpt4 book ai didi

Azure WebJobs NuGet 包错误

转载 作者:行者123 更新时间:2023-12-02 09:13:44 24 4
gpt4 key购买 nike

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

在我更新 NuGet 管理器上的所有包后运行的示例。

这是错误消息:

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'.

这是已安装软件包的列表:

<?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 is deployed incorrectly

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'

根据您的错误信息,我认为问题可能与兼容性有关。

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

关于Azure WebJobs NuGet 包错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49168753/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com