Nservicebus is a "any CPU" framework. It does not have 32-bit or 64-bit specific code. This makes it easy to transition between 32-bit and 64-bit operating systems. Unfortunately, not all components can use the default compilation of any CPU architecture. In many, if not most cases, this is related to legacy systems, 32-bit platform-specific code interoperability with native C libraries, and so on.
Use the default Nservicebus. The host application is always loaded in 64-bit (x64) mode if you are running on a 64-bit operating system, or in 32-bit (x86) mode for a 32-bit operating system. Again, this is not usually a problem.
But if a component or other library contains 32-bit code that must be called and loaded into the process, you have a problem BadImageFormatException
.
Nservicebus V3 started, there are two specific versions of Nservicebus hosts: Default for any CPU version and NServiceBus.Host32.exe
.
The second allows the user to run a 64-bit operating system running the 32-bit nservicebus process, which allows the execution of 32-bit binaries/code without resorting to such workarounds corflags.exe
, guidance. The NET Framework runs in 32-bit mode.
Links to NuGet packages:
- Nservicebus. Host (32-bit and 64-bit)
- Nservicebus. Host32 (32-bit)
Nservicebus 32-bit (x86) host process