0

When I run a .net framework 4.6.1 empty web app with a target platform of x86, it works fine. As soon as I change the platform target to x64 I get this error message:

Could not load file or assembly 'AssemblyName' or one of its dependencies. An attempt was made to load a program with an incorrect format.

I need to run the web app on x64 as I need to use a NuGet package that requires this. It also requires .net framework 4.6.1, hence the reason I'm using this.

Could someone please explain to me how I can get the web app to run on x64 platform?

  • Which 'assemblyname' couldn't be loaded? – Neil Nov 03 '20 at 10:53
  • From this answer here: https://stackoverflow.com/questions/4340362/system-badimageformatexception-an-attempt-was-made-to-load-a-program-with-an-inc I was able to find the setting to use the 64 bit version of IIS Express for web sites and projects. I also set the target platform back to Any CPU. Thanks for the help :) – reggaecoder Nov 03 '20 at 11:46

0 Answers0