Hello everyone.

We have decided to phase out the Mixed Reality Forums over the next few months in favor of other ways to connect with us.

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.

The plan between now and the beginning of May is to clean up old, unanswered questions that are no longer relevant. The forums will remain open and usable.

On May 1st we will be locking the forums to new posts and replies. They will remain available for another three months for the purposes of searching them, and then they will be closed altogether on August 1st.

So, where does that leave our awesome community to ask questions? Well, there are a few places we want to engage with you. 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. 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.