基类包含字段"X",但其类型(System.Web.UI.ScriptManager)与控件的类型(System.Web.UI.ScriptManager)不兼容 [英] Base class includes the field 'X', but its type (System.Web.UI.ScriptManager) is not compatible with the type of control (System.Web.UI.ScriptManager)

查看:75
本文介绍了基类包含字段"X",但其类型(System.Web.UI.ScriptManager)与控件的类型(System.Web.UI.ScriptManager)不兼容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

完整错误是

基类包含字段'ScriptManager1',但是其类型(System.Web.UI.ScriptManager)与控件的类型(System.Web.UI.ScriptManager)不兼容.

The base class includes the field 'ScriptManager1', but its type (System.Web.UI.ScriptManager) is not compatible with the type of control (System.Web.UI.ScriptManager).

还有其他人遇到此错误吗?

Anyone else come across this error?

推荐答案

我设法通过将其添加到web.config中来对其进行了修复:

I managed to fix it by adding this to web.config:

<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <dependentAssembly>
            <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
                <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
        </dependentAssembly>
        <dependentAssembly>
            <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
            <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
        </dependentAssembly>
    </assemblyBinding>
</runtime>

我相信它会强制.net运行时使用这些程序集的新版本.

I believe it forces the .net runtime to use the new versions of those assemblies.

这篇关于基类包含字段"X",但其类型(System.Web.UI.ScriptManager)与控件的类型(System.Web.UI.ScriptManager)不兼容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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