asp.net 无法创建设计器“Microsoft.Reporting.WebForms.ReportViewer,Microsoft.ReportViewer.WebForms”

xvw2m8pv  于 12个月前  发布在  .NET
关注(0)|答案(2)|浏览(145)

我得到了错误
无法创建设计器“Microsoft.Reporting.WebForms.ReportViewer,Microsoft.ReportViewer.WebForms”Version=10.0.0.0,Culture=neutal,PublicKeyToken=b03f5f7f11d50a3a“
我试图从工具箱中添加报表查看器,但在设计视图中出现此错误.正在寻找修复此错误的方法。请帮助。
web.config

<?xml version="1.0" encoding="utf-8"?>

<!--
  For more information on how to configure your ASP.NET application, please visit
  https://go.microsoft.com/fwlink/?LinkId=169433
  -->
<configuration>
  <system.web>
    <compilation debug="true" targetFramework="4.8"/>
    <httpRuntime targetFramework="4.8"/>
  </system.web>
  <system.codedom>
    <compilers>
      <compiler language="c#;cs;csharp" extension=".cs"
        type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
        warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701"/>
      <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb"
        type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
        warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+"/>
    </compilers>
  </system.codedom>

</configuration>

字符串
Default.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="RDLCReport.Default" %>

<%@ Register assembly="Microsoft.ReportViewer.WebForms" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %>



<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <rsweb:ReportViewer ID="ReportViewer1" runat="server">
        </rsweb:ReportViewer>
    </form>
    </body>
</html>

k97glaaz

k97glaaz1#

首先,确保项目中的所有其他reportviewer nuget包都已修复,因为其版本差异是导致此错误的原因。
下载此nuget包-安装包Microsoft.ReportingServices.ReportViewerControl.WebForms -版本150.1400.0

rqdpfwrv

rqdpfwrv2#

是否安装了RDLC扩展?
如果不是Visual Studio顶部菜单>扩展>在线>搜索> RDLC

相关问题