why open xaml in VS2015,show BadImageFormatException: Index not found

%3CLINGO-SUB%20id%3D%22lingo-sub-3537806%22%20slang%3D%22en-US%22%3Ewhy%20open%20xaml%20in%20VS2015%2Cshow%20BadImageFormatException%3A%20Index%20not%20found%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3537806%22%20slang%3D%22en-US%22%3E%3CP%3Eopen%20xaml%20file%20in%20VS2015%20profectional%2Cshow%20BadImageFormatException%3A%20Index%20not%20found.%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22hpxwj_0-1655888142973.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hpxwj_0-1655888142973.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hpxwj_0-1655888142973.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hpxwj_0-1655888142973.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hpxwj_0-1655888142973.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hpxwj_0-1655888142973.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F382640iDAB9E818086A86B3%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22hpxwj_0-1655888142973.png%22%20alt%3D%22hpxwj_0-1655888142973.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20Rebuild%20this%20project%20no%20any%20error.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOpen%20this%20xaml%20file%20in%20another%20computer%20with%20VS2015%20community%20%2Ccan%20show%20the%20window%20correctly.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3537806%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3E.NET%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3542127%22%20slang%3D%22en-US%22%3ERe%3A%20why%20open%20xaml%20in%20VS2015%2Cshow%20BadImageFormatException%3A%20Index%20not%20found%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3542127%22%20slang%3D%22en-US%22%3E%3CP%3ETry%20changing%26nbsp%3Bthe%20project%20to%20x86.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3546360%22%20slang%3D%22en-US%22%3ERe%3A%20why%20open%20xaml%20in%20VS2015%2Cshow%20BadImageFormatException%3A%20Index%20not%20found%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3546360%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1220926%22%20target%3D%22_blank%22%3E%40hpxwj%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EThanks%20for%20posting%20your%20issue%20here.%3C%2FP%3E%0A%3CP%3EHowever%20this%20platform%20is%20used%20for%20how-to%20discussions%20and%20sharing%20best%20practices%20for%20building%20any%20app%20with%20.NET.Since%20your%20issue%20is%20a%20technical%20question%2C%20welcome%20to%20post%20it%20in%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fanswers%2Fproducts%2Fdotnet%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EMicrosoft%20Q%26amp%3BA%3C%2FA%3E%20forum%2C%20the%20support%20team%20and%20communities%20on%20Microsoft%20Q%26amp%3BA%20will%20help%20you%20for%20any%20technical%20questions.%3CBR%20%2F%3EBesides%2C%20it%20will%20be%20appreciated%20if%20you%20can%20share%20it%20here%20once%20you%20post%20this%20technical%20question%20Microsoft%20Q%26amp%3BA.%3CBR%20%2F%3EBest%20Regards%2C%3CBR%20%2F%3ELan%20Huang%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

open xaml file in VS2015 profectional,show BadImageFormatException: Index not found. 

hpxwj_0-1655888142973.png

 

But Rebuild this project no any error.

 

Open this xaml file in another computer with VS2015 community ,can show the window correctly.

 

 

 

 

2 Replies

Try changing the project to x86.

Hi @hpxwj,

Thanks for posting your issue here.

However this platform is used for how-to discussions and sharing best practices for building any app with .NET.Since your issue is a technical question, welcome to post it in Microsoft Q&A forum, the support team and communities on Microsoft Q&A will help you for any technical questions.
Besides, it will be appreciated if you can share it here once you post this technical question Microsoft Q&A.
Best Regards,
Lan Huang