Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.

BadImageFormatException when deploying on Hololens

I'm currently part of a small team working on a project for HoloLens. We're facing a problem when deploying on an unit: My team-mate can deploy from his computer and run the program, but when I do it from mine, on the same unit, it refuses to launch and throws a BadImageFormatException.

If I deploy the same program, from my computer, but on another HoloLens it works flawlessly.

The emulator works too, but there are too many limitations for what we intend to do.

Has any other team encountered the same problem when deploying the same program from two different computers to a single HoloLens ?

Tagged:

Best Answer

Answers

  • I've seen BadImageFormatException in non hololens UWP projects that were targeting the wrong cpu.

    Can you confirm you are building to x86 and all of your libraries are targeting x86 as well?

    Taqtile

  • I confirm :smile:
    This is also verified by the fact that I can deploy that same code on another HoloLens device without any problem. But yes, just in case everything has been double-checked. Unity "builds" the app for HoloLens, and Visual Studio builds it (for real) to x86.

    This only happens when someone deployed a version of the app from his computer on a device, and somone else, later, tries to deploy another version of that same app on that same device, but from another computer.

    Visual Studio only pushes the modifications in the package, and doesn't delete every reference of the app before re-deploying a clean, new one.

    Or maybe I'm wrong about the reasons why this is happening.
    I'll try to make Visual Studio uninstall and reinstall the package on deployment, tomorrow at the office. I hope it will be enough.

  • Thanks !
    jbienzms is right, we had to check the "uninstall and then rinstall my package" for it work.

    Now we can collaborate :smile:

Sign In or Register to comment.