locked
Error running app on WinRT tablet (Surface) BadImageFormatException RRS feed

  • Question

  • When I try to run my app on my new Surface, it crashes immediately.  Here are the details:

    I just bought a Surface table and deployed my application as follows:

    I create a package using the 'ARM' option and copied that to a jump drive.  I inserted the jump drive into the Surface, right-clicked on the 'ps1' file and select 'Run with Powershell'.  It took me through the process of getting a developer license and then installed the app.

    Everything seemed to work fine, and the app shows up on the start menu.  When I click on the app, I see my splash screen, but then the splash screen closes and it takes me back to the start menu.  I can't get beyond the splash screen.

    When I look in the Event Viewer, I see an error saying 'BadImageFormatException'. 

    It seems like I'm installing it on the wrong operation system, but I'm sure the Surface is an 'ARM' processor, and I picked an 'ARM' package.  I also picked the 'Neutral' package and got the same result.

    Any ideas on how to proceed?

    Thanks,

    Reese


    • Edited by ReeseWatt Monday, November 19, 2012 3:26 AM
    Monday, November 19, 2012 3:20 AM

Answers

  • Hello Reese,

    Like we have already discovered, the issue was happening due to an older version of the Windows Azure Mobile Services (WAMS) library reference. Once you had the newer version of the WAMS libraries installed, the issue has been resolved. If there are any pending issues, please feel free to reply back on this answer.

    Thanks,

    Prashant.

    Wednesday, November 21, 2012 8:11 PM
    Moderator

All replies

  • using native dlls that are maybe not compiled for ARM?

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Monday, November 19, 2012 9:02 AM
  • That seems a possibility.  Any quick ways to determine which references might be the problem?  I'm not in front of my solution right now, but these are the non-standard references that I can remember:

    Galasoft MVVM Light

    Windows Azure Mobile services

    Telerik controls for Windows 8

    Service reference to an external WCF service

    Monday, November 19, 2012 2:13 PM
  • try them one by one on the surface in a test project?

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Monday, November 19, 2012 2:29 PM
  • I tried a test app and added all of my references, and the test app ran fine.  So, there's something else in my project besides references that is causing the problem.  Any other ideas for troubleshooting?

    thanks

    Tuesday, November 20, 2012 1:53 AM
  • Hello Reese,

    Like we have already discovered, the issue was happening due to an older version of the Windows Azure Mobile Services (WAMS) library reference. Once you had the newer version of the WAMS libraries installed, the issue has been resolved. If there are any pending issues, please feel free to reply back on this answer.

    Thanks,

    Prashant.

    Wednesday, November 21, 2012 8:11 PM
    Moderator
  • Thanks for your help, Prashant.
    Wednesday, November 21, 2012 8:39 PM