gpt4 book ai didi

typescript - ‘serviceBusTrigger’, 'signalR' 绑定(bind)类型突然未注册

转载 作者:行者123 更新时间:2023-12-02 07:45:19 27 4
gpt4 key购买 nike

直到最近它才似乎随机损坏了。

按照指南操作here我之前已经让信号器和服务总线在本地工作得很好。

似乎在我不改变任何我所知道的情况下就以某种方式破坏了,我的 host.json 在其历史记录中没有差异,看起来像这样:

{
"version": "2.0",
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[1.*, 2.0.0)"
}
}

我尝试将服务总线添加到extensions.json:

<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<WarningsAsErrors></WarningsAsErrors>
<DefaultItemExcludes>**</DefaultItemExcludes>
</PropertyGroup>
<ItemGroup>
**<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.ServiceBus" Version="3.2.0" />**
<PackageReference Include="Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator" Version="1.0.1" />
</ItemGroup>
</Project>

但这导致了进一步的错误:

System.TypeLoadException: Could not load type 'Microsoft.Azure.WebJobs.Hosting.IOptionsFormatter' from assembly 'Microsoft.Azure.WebJobs.Host, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

由于我在崩溃之前没有更改任何内容,所以我觉得这不是正确的修复方法,当然没有遵循 Microsoft 的文档。

还尝试安装 func 扩展,但得到以下结果:

No action performed. Extension bundle is configured in {...directory...}

还可以获取此启动项:

Unable to load startup extension 'SignalR' (Type: 'Microsoft.Azure.WebJobs.Extensions.SignalRService.SignalRWebJobsStartup, Microsoft.Azure.WebJobs.Extensions.SignalRService, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'). The type does not exist. Please validate the type and assembly names.

还尝试删除 AppData/Local/Temp/Functions 并得到一些更可怕的错误:

A host error has occurred during startup operation 'fe7c00af-2f47-4972-9060-e3646811d16c'. [20/04/2020 5:07:05 PM] Microsoft.Azure.WebJobs.ServiceBus: Could not load type 'Microsoft.Azure.ServiceBus.Management.ManagementClient' from assembly 'Microsoft.Azure.ServiceBus, Version=3.0.2.0, Culture=neutral, PublicKeyToken=7e34167dcc6d6d8c'. [20/04/2020 5:07:05 PM] Stopping JobHost Value cannot be null. Parameter name: provider

最佳答案

aaaaaaa,我解决了这个问题,结果在删除 AppData/Local/Temp/Functions 后,错误的原因是我的函数应用程序中的 bin 目录,删除后一切都开始正常工作。

关于typescript - ‘serviceBusTrigger’, 'signalR' 绑定(bind)类型突然未注册,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61143154/

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