paolosalvatori / ServiceBusExplorer

The Service Bus Explorer allows users to connect to a Service Bus namespace and administer messaging entities in an easy manner. The tool provides advanced features like import/export functionality or the ability to test topic, queues, subscriptions, relay services, notification hubs and events hubs.
MIT License
2.02k stars 588 forks source link

Exception with Azure.Core (for release 6.0.0) #787

Closed jassent closed 4 months ago

jassent commented 4 months ago

Upgraded to the current version (6.0.0).

Added a connection string successfully.

Cannot view any queues or topics due to a "Could not load file or assembly 'Azure.Core" exception.

A screenshot is included. Ignore the "specified argument was out of the range of valid values ... parameter name active does not exist" as that was from me trying a different configuration option to see if it would allow me to connect.

Downgrading to 5.0.18 allows a successful connection with no error.

2024-06-29_11-31-52
<11:27:24> The file C:\Users\xxxx\AppData\Roaming\Service Bus Explorer\UserSettings.config is used for the configuration settings.
<11:27:29> The application is now connected to the sb://xxxxx.servicebus.windows.net/ service bus namespace.
<11:27:29> MessagingFactory successfully created.
<11:27:31> Exception: Could not load file or assembly 'Azure.Core, Version=1.33.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
ErikMogensen commented 4 months ago

Did you keep the servicebusexplorer.exe.config from the previous release?

jassent commented 4 months ago

I am not sure how to best answer that. I ran the update using scoop: "scoop update ServiceBusExplorer". When I opened Service Bus Explorer it was version 6.0.0 and all prior saved connections were lost - so I re-added. When I uninstalled version 6 and re-installed version 5.0.18 using scoop, the same connection string worked with no error.

On Sat, Jun 29, 2024 at 3:54 PM Erik Mogensen @.***> wrote:

Did you keep the servicebusexplorer.exe.config from the previous release?

— Reply to this email directly, view it on GitHub https://github.com/paolosalvatori/ServiceBusExplorer/issues/787#issuecomment-2198321565, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFPK6BGX4LHA3YXJD2MAEFTZJ4GHPAVCNFSM6AAAAABKDJJBHKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJYGMZDCNJWGU . You are receiving this because you authored the thread.Message ID: @.***>

ErikMogensen commented 4 months ago

Ok, it seems that you are using the assembly configuration part for v6.0.0, but to make sure:

Please install v6.0.0 and look in servicebusexplorer.exe.config for Azure.Core. It should look like this.

<dependentAssembly>
        <assemblyIdentity name="Azure.Core" publicKeyToken="92742159e12e44c8" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.38.0.0" newVersion="1.38.0.0" /
</dependentAssembly>
jassent commented 4 months ago

Ok, it seems that you are using the assembly configuration part for v6.0.0, but to make sure:

Please install v6.0.0 and look in servicebusexplorer.exe.config for Azure.Core. It should look like this.

<dependentAssembly>
        <assemblyIdentity name="Azure.Core" publicKeyToken="92742159e12e44c8" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.38.0.0" newVersion="1.38.0.0" /
</dependentAssembly>

Thank you! This led me to the solution. I uninstalled 5.0.18 and installed 6.0.0. When I opened the servicebusexplorer.exe.config there was no reference for Azure.Core. When I checked the directory that config file was almost a year old. To resolve, I renamed the servicebusexplorer.exe.config to servicebusexplorer.exe.config.old and then renamed servicebusexplorer.exe.config.original to servicebusexplorer.exe.config.

A screenshot is below. It shows uninstalling, installing, and the old file name.

Feel free to close the issue. Thank you for the suggestion and helping me to resolve.

2024-06-30_07-22-47
ErikMogensen commented 4 months ago

Good, that you got it resolved.

So, Scoop doesn't replace the servicebusexplorer.exe.config file?

In that case it is going to create problems.

jassent commented 4 months ago

So, Scoop doesn't replace the servicebusexplorer.exe.config file?

Correct, it seems to be re-deploying the prior version previously installed on the computer and renaming the correct one in the 6.0.0 nupkg file to "servicebusexplorer.exe.config.original".