question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:15 (3 by maintainers)

github_iconTop GitHub Comments

7reactions
praveensricommented, Apr 19, 2022

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

3reactions
alexkarcher-msftcommented, Apr 19, 2022

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure: Could not load file or assembly 'Microsoft.ServiceBus
Make sure you change the Target Framework (Project properties/Application tab) from '.NET Framework 4 Client Profile' to '.NET Framework 4'.
Read more >
how to fix : Could not load file or assembly 'Azure.Core'
Welcome to Microsoft Q&A forum. Can you confirm that the Azure.Core NuGet package version 1.25.0.0 is installed(exists) locally? And, have you ...
Read more >
Troubleshoot and diagnose workflow failures - Azure Logic ...
Troubleshooting options · In the same virtual network that's integrated with your logic app, create an Azure virtual machine, which you can put ......
Read more >
Create Standard workflows with Visual Studio Code
Create a Standard logic app workflow in single-tenant Azure Logic Apps using ... createNewProject with the error message, Unable to write to ...
Read more >
Create and run .NET Framework code from Standard ...
Failed to retrieve dynamic inputs. Error details: In this scenario, examine your logic app project to check whether the LogicApp\lib\custom ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found