MassTransit: MassTransit 5.0.1 assembly mismatch - public key token
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
- Operating system: Windows 10
- Visual Studio version: 2017
- 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:
- Create a netstandard2.0 nuget package or dll which uses MassTransit.
- Create a new .net project and call this package.
- 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.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15 (8 by maintainers)
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.