I created two project
In my test controller, I used an exported function from a 32-bit unmanaged DLL, using [DllImport("Testing.DLL")]
Copy that 32-bit native DLL file in both the project folders Run as “Any CPU” on my Windows 64-bit Windows 10 with IIS Express (F5 in VS2017)
Project created in Core 2.2 crashed with following exception
[
{
"errorCode": -1001,
"errorString": "An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)",
"exception": {
"ClassName": "System.BadImageFormatException",
"Message": "An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)",
"Data": null,
"InnerException": null,
"HelpURL": null,
"StackTraceString": " at WebApplication1.DCCAPI.BUICExit()\r\n at WebApplication1.Controllers.TS240Controller.BUICInit() in C:\\Users\\Waqar Azeem\\source\\repos\\WebApplication1\\WebApplication1\\Controllers\\TS240Controller.cs:line 71",
"RemoteStackTraceString": null,
"RemoteStackIndex": 0,
"ExceptionMethod": null,
"HResult": -2147024885,
"Source": "WebApplication1",
"WatsonBuckets": null,
"BadImageFormat_FileName": null,
"BadImageFormat_FusionLog": null
}
}
]
Looking for some reason why it do not crashed in .Net 4.6.1. What should i compare in both the projects to figure it out.
User contributions licensed under CC BY-SA 3.0