如何重新启动混合模式程序集是针对运行时的版本“v2.0.50727”构建的,如果没有其他配置信息,则无法在4.0运行时中加载。 [英] How to reslove theMixed 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.

查看:77
本文介绍了如何重新启动混合模式程序集是针对运行时的版本“v2.0.50727”构建的,如果没有其他配置信息,则无法在4.0运行时中加载。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为数据库项目创建了一个安装文件,我正在调试安装程序代码,它会抛出一个错误,例如混合模式程序集是针对运行时的版本'v2.0.50727'构建的,无法在4.0中加载没有其他配置信息的运行时。,如何重新获得此信息,请帮助我并提前感谢..



这是我的代码。

Hi, i created a setup file for database project, and i am debugging the installer code it is thrown an error like "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.", How can reslove this, please help me and advancely thanks..

Here is my code.

private void ExecuteSql(string serverName, string dbName, string Sql)
        {
            string connStr = "Data Source=" + serverName + ";Initial Catalog=" + dbName + ";Integrated Security=True";
            using (SqlConnection conn = new SqlConnection(connStr))
            {
                try
                {
                    Server server = new Server(new ServerConnection(conn));
                    server.ConnectionContext.ExecuteNonQuery(Sql); // i got an error here..
                }
                catch (Exception ex)
                {
                    Log(ex.ToString());
                }
            }
        }

推荐答案

查看此链接 [ ^ ]

在同一位置还有一些替代链接
See the post with the most votes on this link[^]
There are also some alternative links at the same location


这篇关于如何重新启动混合模式程序集是针对运行时的版本“v2.0.50727”构建的,如果没有其他配置信息,则无法在4.0运行时中加载。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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