yes
Yes
the application can load the MassTransit assemblies, configure the IServiceBus, and start up normally, as it does in .NET Core, and has in .NET Framework through 6.3.2
The app throws this fatal error and stops
System.IO.FileLoadException: 'Could not load file or assembly 'MassTransit.ActiveMqTransport, Version=7.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)'
(Paste the link to an example project and exact instructions to reproduce the issue.)
The .NET Standard versions of the ActiveMQ transport assemblies are not signed, therefore the MassTransit assembly cannot be signed.
We never saw this error until we started using 7.0.0, though...
Different packages, MassTransit is only built for .NET Standard (which works with .NET 4.6.1) but the Apache packages are different.
.NETStandard 2.0
Apache.NMS.ActiveMQ.NetStd (>= 1.7.3)
Apache.NMS.NetStd (>= 1.7.1.3899)
MassTransit (>= 7.0.0)
Version 6.3.2
.NETFramework 4.6.1
Apache.NMS (>= 1.7.1)
Apache.NMS.ActiveMQ (>= 1.7.2)
MassTransit (>= 6.3.2)
I am getting simular with a ASP.NET Mvc 5 app that has worked get with all previous versions: (RabbitMQ)
[FileLoadException: Could not load file or assembly 'MassTransit' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)]
[FileLoadException: Could not load file or assembly 'MassTransit, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b8e0e9f2f1e657fa' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)]
System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +232
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) +113
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +23
System.Reflection.Assembly.Load(String assemblyString) +35
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +48
[ConfigurationErrorsException: Could not load file or assembly 'MassTransit, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b8e0e9f2f1e657fa' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +767
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +256
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +58
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +287
System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +69
System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +137
System.Web.Compilation.BuildManager.ExecutePreAppStart() +172
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +854
[HttpException (0x80004005): Could not load file or assembly 'MassTransit, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b8e0e9f2f1e657fa' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +532
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +111
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +724
The assembly are currently (with v7.0.0) being public signed, which is a form of delayed signing.
I'll investigate more, but the question I'd have to ask is, why are you still signing applications in 2020?
Should be addressed by f02905ad330fa6c0b2655cf879aa20b4d4777489
Thank you !!!! that fixed it
This is a massive issue; when will it be published to a stable release? I don't want to fork your code, if possible. :)
Additionally, for anyone that lands here - I found a massive conflict between all pre-3.8.x versions of RabbitMQ and the new Windows Updates (Juneish). You have to upgrade to 3.8.x+, and then you will run into this bug.
Happy you all solved it - thanks for the dedication.
**edit - tried prerelease in NuGet and it worked. Ah, cheers.
Most helpful comment
Thank you !!!! that fixed it