Starting in .NET 10 Preview 2, using hostingModel=outofprocess on arm64 leads to a 500 error.
This is related to #59483
Specifically, this discussion: #59483 (comment)
What's happening here is that the ARM64X binary has a single export for CreateApplication that forwards to the arch-specific binary. However, the arch-specific binary can't be found if the search path (bound when the forwarder module was loaded) doesn't include the forwarder's directory.
In the linked thread in that PR, @halter73 noticed that the arch-specific binary wasn't being loaded but I guess didn't realize that the app was broken.
We need to fix this before shipping .NET 10. The LoadLibraryEx change seems reasonable to me, and I verified that it fixes this issue.
Starting in .NET 10 Preview 2, using
hostingModel=outofprocesson arm64 leads to a 500 error.This is related to #59483
Specifically, this discussion: #59483 (comment)
What's happening here is that the ARM64X binary has a single export for
CreateApplicationthat forwards to the arch-specific binary. However, the arch-specific binary can't be found if the search path (bound when the forwarder module was loaded) doesn't include the forwarder's directory.In the linked thread in that PR, @halter73 noticed that the arch-specific binary wasn't being loaded but I guess didn't realize that the app was broken.
We need to fix this before shipping .NET 10. The LoadLibraryEx change seems reasonable to me, and I verified that it fixes this issue.