混合模式程序集是针对安装程序安装程序中的版本"v2.0.50727"构建的 [英] Mixed mode assembly is built against version 'v2.0.50727' in setup installer

查看:109
本文介绍了混合模式程序集是针对安装程序安装程序中的版本"v2.0.50727"构建的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有Web安装项目安装程序.和Windows应用程序.我在安装期间通过使用安装程序中的覆盖Install()函数来调用Windows应用程序.

在Windows应用程序中,我正在执行sql脚本.假设我运行的Windows应用程序脚本在sql server中完美执行.

使用安装文件时,出现以下错误.

混合模式程序集是针对运行时的版本"v2.0.50727"构建的,如果没有其他配置信息,则无法在4.0运行时中加载."

实际上,当我仅执行Windows应用程序时会遇到此错误.所以我在app.config文件中进行了如下修改:

配置> < startup uselegacyv2runtimeactivationpolicy ="true"> < supportedruntime version ="v4.0">

但是现在,当此Windows应用程序与istallation一起使用时(我的意思是在安装过程中,我正在调用Windows应用程序)其不起作用.如上所述引发错误

还有一个问题:在Windows窗体中,我具有文件夹浏览对话框控件和文件浏览控件.如果我只执行Windows应用程序,则其工作正常.但是在安装文件的过程中无法正常工作.

请指导我如何实现.

谢谢

Hi,

I have web setup project installer program. And windows application. I am calling windows application during installation time by using override Install() function in installer.

In windows application I am executing sql script. Suppose if I run the windows application script is executing in sql server perfectly.

When its working with setup file I am getting the following error.

"Mixed mode assembly is built against version ''v2.0.50727'' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information."

Actuall this error i am getting when i am executing only windows application. So i modified in app.config file as follows:

configuration> <startup uselegacyv2runtimeactivationpolicy="true"> <supportedruntime version="v4.0">

But now when this windows application work with istallation (I mean during installation i am calling windows application) its not working. Its throwing the error as mentioned above

And one more issue: In windows form i have folder browse dialog control and file browse control. If i execut only windows application its working. But in setup file installation times its not working.

Please guide me how to acheive it.

Thanks

推荐答案

检查此KB

知识库文章1012776:混合模式程序集是针对运行时的版本"v2.0.50727"构建的,无法在没有附加配置信息的4.0运行时" [ ^ ]
Check this KB

KB Article ID 1012776: A "Mixed mode assembly is built against version ''v2.0.50727'' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information"[^]


这篇关于混合模式程序集是针对安装程序安装程序中的版本"v2.0.50727"构建的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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