我已将Web应用程序从.NET 3.5升级到.NET 4,并且在浏览到使用Chart控件的页面时出现此异常:

The type ‘System.Web.UI.DataVisualization.Charting.Grid’ exists in both ‘c:WindowsMicrosoft.NETassemblyGAC_MSILSystem.Web.DataVisualizationv4.0_4.0.0.0__…System.Web.DataVisualization.dll’ and ‘c:WindowsassemblyGAC_MSILSystem.Web.DataVisualization3.5.0.0__…System.Web.DataVisualization.dll’

如何使用4.0控件实现此功能?谢谢.

你可以使用 assembly redirection.

例如(确保publicKeyToken是正确的,我在这台计算机上没有程序集):

<configuration>
   <runtime>
      <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
         <dependentAssembly>
            <assemblyIdentity name="System.Web.DataVisualization"
                              publicKeyToken="32ab4ba45e0a69a1"
                              culture="neutral" />
            <bindingRedirect oldVersion="3.5.0.0"
                             newVersion="4.0.0.0"/>
         </dependentAssembly>
      </assemblyBinding>
   </runtime>
</configuration>
本站提供的所有下载资源均来自互联网,仅提供学习交流使用,版权归原作者所有。如需商业使用,请联系原作者获得授权。 如您发现有涉嫌侵权的内容,请联系我们 邮箱:alixiixcom@163.com