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.

MassTransit 5.0.1 assembly mismatch - public key token

See original GitHub issue

Is this a bug report?

Yes

Can you also reproduce the problem with the lastest version?

Yes (stable 5.0.1 and 5.0.1.1500-develop). It works fine with 4.0.1.

Environment

  1. Operating system: Windows 10
  2. Visual Studio version: 2017
  3. Dotnet version: .NET 4.7.1 and netstandard 2.0

Steps to Reproduce

Hi, there might be an issue about MassTransit dll signatures in the latest version:

  1. Create a netstandard2.0 nuget package or dll which uses MassTransit.
  2. Create a new .net project and call this package.
  3. Start the solution.

Expected Behavior

Masstransit server starts.

Actual Behavior

A MassTransit exception is thrown:


Message	"Could not load file or assembly 'MassTransit, Version=5.0.1.1500, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
 The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)"

FusionLog "=== Pre-bind state information ===
LOG: DisplayName = MassTransit, Version=5.0.1.1500, Culture=neutral, PublicKeyToken=null\n (Fully-specified)
LOG: Appbase = file:///D:/LocalSources/TestMassTransit3/TestMassTransit3/bin/Debug/net471/
LOG: Initial PrivatePath = NULL
Calling assembly : Spd.Communication.Queuing, Version=2.3.2.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: D:\\LocalSources\\TestMassTransit3\\TestMassTransit3\\bin\\Debug\\net471\\TestMassTransit3.exe.Config
LOG: Using host configuration file: 
LOG: Using machine configuration file from C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\config\\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///D:/LocalSources/TestMassTransit3/TestMassTransit3/bin/Debug/net471/MassTransit.DLL.
WRN: Comparing the assembly name resulted in the mismatch: PUBLIC KEY TOKEN
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated."

This error only occurs when referencing MassTransit through an external library, if we call the same code directly everything is fine.

Thanks for your help.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
phatboygcommented, May 8, 2018

Well, F*.

Talking to the runtime team at Microsoft, they’re like, yeah, this sucks. We hate strong names, but you’re F’d, so you might as well put them all back on your .NET Standard project. Of course this means I have to update the entire stack, which isn’t going to happen this week.

0reactions
paulyipkhcommented, May 4, 2018

I tried https://www.nuget.org/packages/Brutal.Dev.StrongNameSigner/ but still cannot figure out how to make it work. My app is also a console app running as a TopShelf windows service. At the moment, I will stay with 4.0.1 and try to find time to investigate into the work around.

Read more comments on GitHub >

github_iconTop Results From Across the Web

FileLoadException on DLL Load
dll I get 75a99a2a5bcd4c96. I'm honestly at a loss how at runtime it thinks the public key token is null and why there...
Read more >
How to: Determine the Public Key Token of the Windows ...
Describes how to determine the public key token of the Windows client control add-in and .NET Framework assembly.
Read more >
Oracle Identity Management Integration Guide
Oracle Directory Integration and Provisioning-Only Installation. ... during transmission by using public-key encryption available with SSL. In public-key.
Read more >
Cannot find assembly 'mscorlib, version=2.0.5.0, culture= ...
AssemblyLoadException: Cannot find assembly 'mscorlib, version=2.0.5.0, culture=neutral, publickeytoken=7cec85d7bea7798e'. [Public key mismatch]
Read more >
Untitled
Daktaras ozas dieta, Morality guide mass effect, Mateevici 75 chisinau. ... Mare nostrum montpellier 2013, Network security key mismatch windows 7!
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