With a ASP.NET Core MVC web app, is there a way to run the Kestrel web server in 64-bit (or AnyCPU) mode? If I change my app's target platform from the default x86 to either x64 or AnyCPU, it no longer runs, producing a System.BadImageFormatException when trying to start Kestrel (Microsoft.AspNetCore.Server.Kestrel).
ETA: To investigate further, I decompiled Microsoft.AspNetCore.Server.Kestrel. It's built for AnyCPU, but appears to contain a mix of MSIL and native x86 code for the libuv library, which is written in C. It's not clear why the only way to load it is from an assembly built for x86, with both AnyCPU and x64 producing the "bad image" error. One would expect to be able to load a AnyCPU assembly from another AnyCPU assembly, yet this is not the case. It's also puzzling that a AnyCPU assembly would contain some native x86.