“An attempt was made to load a program with an incorrect format” even when the platforms are the same

前端 未结 20 2900
悲&欢浪女
悲&欢浪女 2020-11-22 13:57

I\'m calling functions from a 32-bit unmanaged DLL on a 64-bit system. What I get is:

BadImageFormatException: An attempt was made to load a program w

20条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-22 14:35

    If you encounter this error when you click green arrow button to run the application, but still want to run the app in 64 bit. You can do this in VS 2013, 2015, 2017, and 2019

    Go to: Tools > Options > Projects and Solutions > Web Projects > Use the 64 bit version of IIS Express

提交回复
热议问题