• Upgrade your Internet Experience
  • Sign in
  • Microsoft.com
  • United States (English)
    Brasil (Português)Česká republika (Čeština)Deutschland (Deutsch)España (Español)France (Français)Italia (Italiano)Россия (Русский)대한민국 (한국어)中华人民共和国 (中文)台灣 (中文)日本 (日本語)香港特别行政區 (中文)
 
 
Visual Studio Developer Center
 
 
Home
 
 
Library
 
 
Learn
 
 
Download
 
 
Support
 
 
Community
 
 
Forums
 
 
 
Visual Studio Developer Center > Visual Studio Forums > Phoenix > Fix for "BadImageFormatException was unhandled" on x64 platforms
Ask a questionAsk a question
Search Forums:
  • Search Phoenix Forum Search Phoenix Forum
  • Search All Visual Studio Forums Search All Visual Studio Forums
  • Search All MSDN Forums Search All MSDN Forums
 

AnswerFix for "BadImageFormatException was unhandled" on x64 platforms

  • Monday, March 19, 2007 9:48 PMRavi Pandya - Microsoft Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Vote As Helpful
    1

    In case anyone else runs into this, I found a solution on the ADO.NET forum:

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=665884&SiteID=1

    You need to set Properties > Build > Platform target to "x86". This will force it to run in WoW64, so the 32-bit mixed model Phoenix assemblies will load.

    Ravi

    • ReplyReply
    • QuoteQuote
     

Answers

  • Thursday, March 22, 2007 3:27 PMKang Su GatlinModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Vote As Helpful
    1

    Thanks for that link Ravi.  That is correct.  In the future we should change the solutions so that they come out the box as 32bit only.

    Another thing you can do is set your system so that it uses the 32bit CLR by-default.  You can do this by calling:

    C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\Ldr64.exe setwow

    If you're doing this from a Vista box, make sure you run this from an Administrator command prompt.

    Thanks,

    • ReplyReply
    • QuoteQuote
     

All Replies

    Need Help with Forums? (FAQ)
     
    © 2009 Microsoft Corporation. All rights reserved.
    Terms of Use
    |
    Trademarks
    |
    Privacy Statement