gpt4 book ai didi

c# - reportviewer从VS2010到VS2015如何解决

转载 作者:太空狗 更新时间:2023-10-29 20:23:37 27 4
gpt4 key购买 nike

找答案试了半天。我正在使用该项目在 VS2010 中开发的 VS2015 和 MS SQL SERVER 2008 R2。

但是,出现错误,

ASP.NET runtime error: The base class includes the field 'ReportViewer1', but its type (Microsoft.Reporting.WebForms.ReportViewer) is not compatible with the type of control (Microsoft.Reporting.WebForms.ReportViewer). please modify the associated registration that is causing ambiguity and pick a new tag prefix

我找不到 reportViewer.Webfor.dll v12.0.0.0。我做了以下步骤/过程,ReportViewer仍然无效:
感谢您的帮助!!

  1. 安装 reportViewer 2015 runtime、Report Viewer 2010 Redistributable Package
  2. 安装SQL Server数据工具2015
  3. 在 .aspx 中,

    <%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=12.0.0.0, 
    Culture=neutral, PublicKeyToken=89845dcd8080cc91"
    Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
  4. 在 web.config 中,

    <handlers>   
    <add name="ReportViewerWebControlHandler" preCondition="integratedMode"
    verb="*" path="Reserved.ReportViewerWebControl.axd"
    type="Microsoft.Reporting.WebForms.HttpHandler,
    Microsoft.ReportViewer.WebForms, Version=12.0.0.0, Culture=neutral,
    PublicKeyToken=89845dcd8080cc91"/>
    </handlers>

最佳答案

我解决了我的问题。您必须删除所有旧版本 V10 并添加新版本 v12 of 4 reportviewer.dll。
路径是 C:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.Common
其次,我们需要复制这 4 个 .dll 并粘贴到项目中的 bin 文件夹中。
然后就可以完美的运行你的reportviewer了

关于c# - reportviewer从VS2010到VS2015如何解决,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32540006/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com