logicapps: New Logic App Fails - Could not load file or assembly Microsoft.Azure.ServiceBus

When I create a new Azure Logic App, add a work flow, then try open the designer I get the following error in the Output window for the “Azure Logic Apps (Standard)” VS Code extension.

4:44:16 AM: Running command: "func host start --port 8000"...

Azure Functions Core Tools
Core Tools Version:       3.0.3904 Commit hash: c345f7140a8f968c5dbc621f8a8374d8e3234206  (64-bit)
Function Runtime Version: 3.3.1.0

[2022-04-19T04:44:21.463Z] A host error has occurred during startup operation 'e3e7df04-9092-4133-b672-434135af3450'.
[2022-04-19T04:44:21.463Z] System.Private.CoreLib: Exception has been thrown by the target of an invocation. Microsoft.Azure.Workflows.ServiceProviders.ServiceBus: Could not load file or assembly 'Microsoft.Azure.ServiceBus, Version=4.2.1.0, Culture=neutral, PublicKeyToken=7e34167dcc6d6d8c'. The system cannot find the file specified.
[2022-04-19T04:44:21.463Z] .
Value cannot be null. (Parameter 'provider')

If I start Azurite, and try run the app, I get this error:

5:18:27 AM: Running command: "func GetExtensionBundlePath"...
5:18:29 AM: Extension bundle path: "/home/vscode/.azure-functions-core-tools/Functions/ExtensionBundles/"...
5:18:29 AM: Error: ENOENT: no such file or directory, scandir '/home/vscode/.azure-functions-core-tools/Functions/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle.Workflows'

Versions:

.NET Core SDK version: 3.1.416

Azure Functions Core Tools
Core Tools Version:       3.0.3904 Commit hash: c345f7140a8f968c5dbc621f8a8374d8e3234206  (64-bit)
Function Runtime Version: 3.3.1.0

Prerequisites

  • Visual Studio Code
  • Docker Desktop
  • VS Code - Remote Containers Extension (“ms-vscode-remote.remote-containers”)

Quick Example:

Here is an example app that I built using a VS Code dev container - just clone the app, and open using a dev container in VSCode https://github.com/Garyljackson/azure-logic-app-example/tree/example-app

If you want just the dev container (which also includes all the required VS Code extensions) then that’s on the main branch https://github.com/Garyljackson/azure-logic-app-example

The dev container used is the standard Microsoft provided Azure Functions & C# - .NET Core 3.1 dev container.

image

Manual Steps:

  • Open Visual Studio Code in a folder
  • Using the remote container ext: “Add Development Container Configuration Files”
  • Select the Azure Functions & C# - .NET Core 3.1 dev container
  • Edit devcontainer.json extensions section to:
	"extensions": [
		"ms-azuretools.vscode-azurefunctions",
		"ms-dotnettools.csharp",
		"ms-azuretools.vscode-azurelogicapps",
		"ms-azuretools.vscode-docker",
		"ms-vscode.azure-account",
		"Azurite.azurite"
	],
  • Using the remote container ext: Open Folder in Container
  • Wait for container to build, and for extensions to install
  • In VSCode, select the Azure Extension, and then the Logic Apps (Standard) section
  • Click the “Create New Project” button
  • Accept the default folder
  • Select Stateful Workflow
  • Name workflow Stateful1
  • Go back to the explorer view, right click on the Workflow.json and select Open in Designer (it will fail)
  • Go to the OUTPUT tab and view the output for Azure Login App (Standard) - Error above

The same error occurs irrespective of whether I start Azurite or not

If you want to try run the App:

  • Start Azureite
  • F5

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 15 (3 by maintainers)

Most upvoted comments

The Logic App team is actively working on this issue, stay tune for more information.

We have rolled back the release on our side and you all should see your bundles updated locally in the next hour or so (11:30am PDT expected resolution). No change is needed on your side. VS Code should downgrade the package automatically to 1.1.32.

Same issue for me.

Core Tools Version:       3.0.4484 Commit hash: N/A  (64-bit)
Function Runtime Version: 3.4.2.0 

To continue with designer i set the extension version to the prevous one obtained from index link. https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle.Workflows/index.json

But i am not sure if it will introduce some other problems.

"extensionBundle": {
    "id": "Microsoft.Azure.Functions.ExtensionBundle.Workflows",
    "version": "[1.1.32, 1.1.33)"
}

Hope it will help

Observation: If you start the command with default version it will download Microsoft.Azure.Functions.ExtensionBundle.Workflows 1.1.54132173

func host start --port 8001 --verbose

and this has in dependency ServiceBus 5.2.0.0 and from the class Microsoft.Azure.Workflows.ServiceProviders.ServiceBus is 4.2.1.0 needed which is loaded with Microsoft.Azure.Functions.ExtensionBundle.Workflows 1.1.32.

These packages are built from a private repository. We’re still in the midst of a root cause analysis, so for the time being we’ve just re-deployed the previous version of our extension.

Copying Microsoft.Azure.ServiceBus.dll from the previous version of the Extension Bundle seems to fix this.

I copied it from C:\Users\<UserName>\.azure-functions-core-tools\Functions\ExtensionBundles\Microsoft.Azure.Functions.ExtensionBundle.Workflows\1.1.32\bin to C:\Users\<UserName>\.azure-functions-core-tools\Functions\ExtensionBundles\Microsoft.Azure.Functions.ExtensionBundle.Workflows\1.1.54132173\bin

and the designer opened fine.