尝试安装MSI时出现BadImageFormatException [英] BadImageFormatException when trying to install msi

查看:126
本文介绍了尝试安装MSI时出现BadImageFormatException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用VS 2015和.net Framework 4.6.我有多个项目的解决方案.当我建立解决方案时,它工作正常.我为版本x64构建解决方案和所有项目.我还有一个安装程序项目,其中包含所有项目的dll.当我构建安装程序时,它会成功构建.真正的问题是当我尝试安装该版本时出现的. 它给了我一个例外:BadImageFormatException

I am using VS 2015 and .net framework 4.6. I have one solution with multiple projects. When i build the solutions it works fine. I build solution and all the projects for Release x64. I have one installer project as well which contains dll of all the projects. When i build the installer it build successfully. The real problem comes when i am trying to install that build. It gives me an exception : BadImageFormatException

推荐答案

检查NET FW版本.如果有针对NET 4.0 CLR的代码,则不会加载NET 2 CLR(不包括NET 3.x).

Check the NET FW versions. If there is code targeted at the NET 4.0 CLR a NET 2 CLR (up to and including NET 3.x) won't load it.

(添加为张贴者回答后的答案).

(Added as an answer following poster's response).

这篇关于尝试安装MSI时出现BadImageFormatException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆