无法使用 Visual Studio 代码创建 Azure 逻辑应用程序工作流

Not able to create Azure Logic App workflow using Visual Studio Code

正在尝试遵循 this 教程。

当我右键单击 workflow.json 和 select Open in Designer 时,我终于得到以下消息。

[2021-11-11T16:25:32.880Z] A host error has occurred during startup operation 'ae98f37d-d7d4-4131-920d-a725de7dc6cb'.
[2021-11-11T16:25:32.880Z] Microsoft.Extensions.DependencyInjection: Cannot access a disposed object.
[2021-11-11T16:25:32.880Z] Object name: 'IServiceProvider'.
9:56:42 pm: Running command: "func host start --port 8000"...

Azure Functions Core Tools
Core Tools Version:       4.0.3971 Commit hash: d0775d487c93ebd49e9c1166d5c3c01f3c76eaaf  (64-bit)
Function Runtime Version: 4.0.1.16815

[2021-11-11T16:26:43.913Z] ExtensionStartupType EventHubsWebJobsStartup from assembly 'Microsoft.Azure.WebJobs.EventHubs, Version=4.1.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not meet the required minimum version of 4.2.0.0. Update your NuGet package reference for Microsoft.Azure.WebJobs.Extensions.EventHubs to 4.2.0 or later.
[2021-11-11T16:26:43.917Z] A host error has occurred during startup operation 'c15e2264-73c8-4f04-b0fd-7498d70f31c9'.
[2021-11-11T16:26:43.917Z] Microsoft.Azure.WebJobs.Script: One or more loaded extensions do not meet the minimum requirements. For more information see https://aka.ms/func-min-extension-versions.
[2021-11-11T16:26:43.917Z] ExtensionStartupType EventHubsWebJobsStartup from assembly 'Microsoft.Azure.WebJobs.EventHubs, Version=4.1.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not meet the required minimum version of 4.2.0.0. Update your NuGet package reference for Microsoft.Azure.WebJobs.Extensions.EventHubs to 4.2.0 or later.
[2021-11-11T16:26:43.917Z] .
Value cannot be null. (Parameter 'provider')
[2021-11-11T16:26:43.945Z] A host error has occurred during startup operation '13d7a2b9-4b0a-494f-a11a-0d4862a718b1'.
[2021-11-11T16:26:43.945Z] Microsoft.Extensions.DependencyInjection: Cannot access a disposed object.
[2021-11-11T16:26:43.945Z] Object name: 'IServiceProvider'.

我什至用命令更新了 csproj 文件

dotnet add package Microsoft.Azure.WebJobs.Extensions.EventHubs --version 4.3.0

但问题依然存在。

另外如您所见,设计器试图获取某些内容,但显示 获取失败

最后,正如您在图片右下角看到的,我收到了这条消息

工作流验证失败:请求 http://localhost:8000/runtime/webhooks/workflow/api/management/workflows/Stateful1/validate?api-version=2019-10-01-edge-preview 失败,原因:连接 ECONNREFUSED 127.0。 0.1:8000。指示的来源是 Azure Logic Apps (Standard) (Extension)

有什么想法吗?

我又找到了一个 YouTube tutorial 但我无法在我的机器上运行它。

已提出问题 here as well on github

我遇到了同样的问题。在我的例子中,解决方案是进入控制面板并卸载 Azure Function Core Tool (4.x)(如果可用)。然后打开您的 Powershell 并 运行 以下命令:

npm install -g azure-functions-core-tools@3 --unsafe-perm false

是的,终于。是 Azure Functions Core Tools 在作怪。谢谢@NDDev

我有这个 4.0.397,这就是问题所在。

现在从 here 获取正确的版本。

确保您 select 3.x