Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send Message Exception: Could not load type 'Microsoft.ServiceBus.Messaging.MessagingEntityClient' #796

Open
alenroki opened this issue Jul 15, 2024 · 3 comments

Comments

@alenroki
Copy link

On a new computer where I am downloading Azure Service Bus Explorer ver. 6.0.2 for the first time, I connect to my Service Bus just fine, but when I try to send a message to my queue, I get this exception:

Exception: Could not load type 'Microsoft.ServiceBus.Messaging.MessagingEntityClient' from assembly 'Microsoft.ServiceBus, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

In my GAC I have the following:

gacutil /l Microsoft.ServiceBus:
Microsoft (R) .NET Global Assembly Cache Utility.  Version 4.0.30319.0
Copyright (c) Microsoft Corporation.  All rights reserved.

The Global Assembly Cache contains the following assemblies:
  Microsoft.ServiceBus, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL

Number of items = 1

In the folder where Service Bus is unzipped the Microsoft.ServiceBus.dll does exist as well but with this version: 3.0.52723.2

This error with this DLL I have experienced on every single machine since version 4.0.

@ErikMogensen
Copy link
Collaborator

It is unfortunate that the version part of the strong name of the Microsoft.ServiceBus assembly is not incremented when they are releasing incompatible versions.

The best thing is if you can remove it from the GAC. If that is not possible you can try a couple of workarounds:

  1. Use DEVPATH. If this works, you can have a script that sets it and then launches SBE.

  2. Overwrite the Microsoft.ServiceBus assembly in the GAC with a new version. It may be locked by Windows Installer. If that's the case uninstall the other application and put the latest Microsoft.ServiceBus in the GAC and then reinstall the other application. However, if newer versions of Microsoft.ServiceBus are released you may have to do this procedure again.

@ErikMogensen
Copy link
Collaborator

@alenroki, did you get it working?

@alenroki
Copy link
Author

It only works if I take the Microsoft.ServiceBus.dll that came in the package for ServiceBus Explorer and replace the existing one in the DAC. This has been a problem on every new machine I've installed this tool on. I would have hoped that by increasing releases this issues would have been fixed. I didn't know how to configure DEVPATH as you mentioned. Couldn't find examples of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants