{"id":77,"date":"2011-07-27T00:30:29","date_gmt":"2011-07-27T00:30:29","guid":{"rendered":"http:\/\/www.benbarefield.com\/blog\/?p=77"},"modified":"2011-07-27T00:31:11","modified_gmt":"2011-07-27T00:31:11","slug":"x86-net-assembly-scala-and-a-x64-processor-oh-my","status":"publish","type":"post","link":"https:\/\/www.benbarefield.com\/blog\/2011\/07\/27\/x86-net-assembly-scala-and-a-x64-processor-oh-my\/","title":{"rendered":"x86 .Net Assembly, Scala, and a x64 processor. Oh My!"},"content":{"rendered":"<p>While playing around with Scala.Net today I ran into an interesting problem. I was trying to build some Scala code against an assembly built for x86 and I got an exception when I ran the executable:<\/p>\n<p>Unhandled Exception: System.BadImageFormatException: Could not load file or assembly [\u2026]. An attempt was made to load a program with an incorrect format\u2026<\/p>\n<p>After a bunch of internet searches, and some help from <a href=\"http:\/\/twitter.com\/#!\/billwagner\">Bill Wagner<\/a>, I got this working. The executable needs to be set to run in 32 bit mode. This can be done with the corflags tool. corflags will exist in your path from a Visual Studio terminal. The trick is:<\/p>\n<p>corflags &lt;Executable name&gt; \/32Bit+<\/p>\n<p>After that everything worked.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>While playing around with Scala.Net today I ran into an interesting problem. I was trying to build some Scala code against an assembly built for x86 and I got an exception when I ran the executable: Unhandled Exception: System.BadImageFormatException: Could &hellip; <a href=\"https:\/\/www.benbarefield.com\/blog\/2011\/07\/27\/x86-net-assembly-scala-and-a-x64-processor-oh-my\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,28],"tags":[],"class_list":["post-77","post","type-post","status-publish","format-standard","hentry","category-net","category-scala"],"_links":{"self":[{"href":"https:\/\/www.benbarefield.com\/blog\/wp-json\/wp\/v2\/posts\/77","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.benbarefield.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.benbarefield.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.benbarefield.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.benbarefield.com\/blog\/wp-json\/wp\/v2\/comments?post=77"}],"version-history":[{"count":1,"href":"https:\/\/www.benbarefield.com\/blog\/wp-json\/wp\/v2\/posts\/77\/revisions"}],"predecessor-version":[{"id":78,"href":"https:\/\/www.benbarefield.com\/blog\/wp-json\/wp\/v2\/posts\/77\/revisions\/78"}],"wp:attachment":[{"href":"https:\/\/www.benbarefield.com\/blog\/wp-json\/wp\/v2\/media?parent=77"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.benbarefield.com\/blog\/wp-json\/wp\/v2\/categories?post=77"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.benbarefield.com\/blog\/wp-json\/wp\/v2\/tags?post=77"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}