两者中都存在“ReportViewer” [英] 'ReportViewer' exists in both

查看:69
本文介绍了两者中都存在“ReportViewer”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一些帮助来解决以下问题:



我一直在网站上使用MS ReportViewer组件一段时间了,但最近我已经得到了如下所示的错误。



'c:\'中存在'Microsoft.Reporting.WebForms.ReportViewer'类型Windows \assembly\GAC_MSIL \ Microsoft.ReportViewer.WebForms \8.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll'和'c:\ Windows \assembly\GAC_MSIL \ Mysrosoft.ReportViewer.WebForms \9.0.0.0__b03f5f7f11d50a3a \ Microsoft.ReportViewer.WebForms.dll'



Summery Sir,

它在VS 2005 NET中启动了一个应用程序2.0 / Sql 2005 / RDLC报告服务。



现在我想切换到VS 2008(利用NET 3.5)。在同一台PC上。因此安装VS 2008和VWG for net 3.5 - 一切正常。我不得不安装Sql 2008 / RDLC Reporting Services



当我在VS 2008中打开报告时,它将转换为新格式。没关系。



我的aspx这个



 <%@     Page    语言  =  C#     MasterPageFile   = < span class =code-keyword>〜/ M.master    AutoEventWireup   =  true    CodeFile   =  Abc.aspx.cs   继承  =  Reports_Abc   标题  =  无标题页   %>  
<%@ 注册 Src = WebUserControl.ascx TagName = WebUserControl

T agPrefix = uc1 %>
<%@ 注册 程序集 = Microsoft.ReportViewer.WebForms,Version = 9.0.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a

命名空间 = Microsoft.Reporting.WebForms TagPrefix = rsweb %>

< asp:内容 ID = Content1 ContentPlaceHolderID < span class =code-keyword> = 内容 Runat = 服务器 >
< uc1:WebUserControl ID = WebUserControl1 runat = server / >
< < span class =code-leadattribute> rsweb:reportviewer id = ReportViewer1 runat = server width = 100% > < / rsweb:reportviewer >
< / asp:内容 >









配置文件的某些部分



 <   system.web  >  
<! -
设置编译debug = true将调试
符号插入编译页面。由于此
会影响性能,因此在开发期间将此值设置为true仅

- >

< httphandlers >
< add path = Reserved.ReportViewerWebControl.axd 动词 = * type = Microsoft.Reporting .WebForms.HttpHandler,Microsoft.ReportViewer.WebForms,Version = 9.0.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a >
validate =false/>
< / add > < / httphandlers >
< 编译 < span class =code-attribute> debug = true >
< buildproviders >
< add extension = .rdlc type = Microsoft.Reporting.RdlBuildProvider,Microsoft.ReportViewer.Common,Version = 8.0.0.0, Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a / >
< / buildproviders >
< 程序集 >


< add assembly = Microsoft.ReportViewer.WebForms,Version = 9.0.0.0,Culture = neutral,PublicKeyToken = B03F5F7F11D50A3A / >
< ; add assembly < span class =code-keyword> = Microsoft.ReportViewer.Common,Version = 9.0.0.0,Culture = neutral,PublicKeyToken = B03F5F7F11D50A3A < span class =code-attribute> / >
< add 程序集 = Microsoft.ReportViewer.WinForms,Version = 9.0.0.0,Culture = neutral, PublicKeyToken = B03F5F7F11D50A3A / >
< / assemblies >
< / compilation >

< / system.web >

请给出这个问题的任何建议...?

解决方案

转到解决方案资源管理器并删除所有'Microsoft .ReportViewer.WebForms引用。然后添加最新目录(VS2008)中的引用。转到Build菜单并单击clean solution并单击Rebuild solution。



问候,

BlueSathish


检查分辨率上的此链接以在配置中绑定旧的和新的Dll。



http://stackoverflow.com/questions/9429277/problems-with-reportviewer -assemblies-in-vs2010



以下示例



< runtime> < br /> 
< assemblybinding xmlns =urn:schemas-microsoft-com:asm.v1appliesto =v2.0.50727>< br />
< dependentassembly>< ; br />
< assemblyidentity name =Microsoft.ReportViewer.WebFormspublickeytoken =b03f5f7f11d50a3a/>< br />
< bindingredirect oldversion =9.0.0.0newversion = 10.0.0.0/>< br />
< / dependentassembly>< br />
< / assemblybinding>< br />


在web.config上查看程序集信息。出现两次Microsoft.ReportViewer.WebForms,一个是12.0.0.0,另一个是11.0.0.0。得到其中一个。


I need some help with the following problem:

I've been using a MS ReportViewer component in a website for a while now, but recently I've been getting the error shown below.

The type 'Microsoft.Reporting.WebForms.ReportViewer' exists in both 'c:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\8.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll' and 'c:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\9.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll'


Summery Sir,
It's started an app in VS 2005 NET 2.0 / Sql 2005 / RDLC reporting services.

Now I wanted to switch to VS 2008 (to take advantage of NET 3.5). On the same PC. So installed VS 2008 and VWG for net 3.5 - all works ok. I had to install Sql 2008 / RDLC Reporting Services

When I open a report in VS 2008, it is converted to a new format. That's ok.

my aspx this

<%@ Page Language="C#" MasterPageFile="~/M.master" AutoEventWireup="true" CodeFile="Abc.aspx.cs" Inherits="Reports_Abc" Title="Untitled Page" %>
<%@ Register Src="WebUserControl.ascx" TagName="WebUserControl"

    TagPrefix="uc1" %>
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

    Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Content" Runat="Server">
    <uc1:WebUserControl ID="WebUserControl1" runat="server" />
    <rsweb:reportviewer id="ReportViewer1" runat="server" width="100%"></rsweb:reportviewer>
</asp:Content>




and
some part of config file

<system.web>
  <!-- 
            Set compilation debug="true" to insert debugging 
            symbols into the compiled page. Because this 
            affects performance, set this value to true only 
            during development.
        -->
  <httphandlers>
    <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
      validate="false" />
  </add></httphandlers>
  <compilation debug="true">
    <buildproviders>
      <add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
    </buildproviders>
    <assemblies>
      
      
      <add assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
      <add assembly="Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
      <add assembly="Microsoft.ReportViewer.WinForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
    </assemblies>
  </compilation>
    
</system.web>

pls give any suggession for this problem...?

解决方案

Go to Solution explorer and remove all 'Microsoft.ReportViewer.WebForms references. Then Add the references from your latest directory (VS2008). Go to Build menu and Click clean solution and Click Rebuild solution.

Regards,
BlueSathish


check this link on the resolution to bind old and new Dll's in the config.

http://stackoverflow.com/questions/9429277/problems-with-reportviewer-assemblies-in-vs2010

example below

<runtime><br />
    <assemblybinding xmlns="urn:schemas-microsoft-com:asm.v1" appliesto="v2.0.50727"><br />
  <dependentassembly><br />
    <assemblyidentity name="Microsoft.ReportViewer.WebForms" publickeytoken="b03f5f7f11d50a3a" /><br />
    <bindingredirect oldversion="9.0.0.0" newversion="10.0.0.0" /><br />
  </dependentassembly><br />
</assemblybinding><br />


on web.config review assembly info. appear two times "Microsoft.ReportViewer.WebForms" one with 12.0.0.0 and other with 11.0.0.0. just get one of this.


这篇关于两者中都存在“ReportViewer”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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