locked
CS0433: The type 'Microsoft.Reporting.WebForms.ReportDataSource' RRS feed

  • Question

  • User70883468 posted

    Hai Guys,

     In my website I got the following error message. It shows only in deployed server. In my developement system no errors occur. I have some sql reports (rdlc) in my webite. I am developing the website in VS2005 Pro. There is some printing issue with Reportviewer in VS2005 Pro. So I decided to change it into Reportviewer 9 and change the .Net framework 2.0 to 3.5 (Using VWD 2008 Express). In my website I change the ReportViewer version 8.0.0.0 into 9.0.0.0. All reports are working perfectly in development system no issues. But after deloplyed to the server the following error message shows. Please anyone help me on this. Thanks in advance.

     

    Compilation Error
    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

    Compiler Error Message: CS0433: The type 'Microsoft.Reporting.WebForms.ReportDataSource' 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'

    Source Error:

     

    Line 228:       
    Line 229:        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
    Line 230:        private global::Microsoft.Reporting.WebForms.ReportDataSource @__BuildControl__control9() {
    Line 231:            global::Microsoft.Reporting.WebForms.ReportDataSource @__ctrl;
    Line 232:           
     

    Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\einventory\5710fe63\87c48ad0\App_Web_grnreport.aspx.dfa151d5.trytsolc.0.cs    Line: 230

     

    Show Detailed Compiler Output:


    c:\windows\system32\inetsrv> "C:\WINDOWS\Microsoft.NET\Framework\v3.5\csc.exe" /t:library /utf8output /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Data.Linq\3.5.0.0__b77a5c561934e089\System.Data.Linq.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.Common\8.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.Common.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll" /R:"C:\WINDOWS\assembly\GAC\CrystalDecisions.Enterprise.InfoStore\10.2.3600.0__692fbea5521e1304\CrystalDecisions.Enterprise.InfoStore.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\8.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\einventory\5710fe63\87c48ad0\assembly\dl3\94b81576\0025f759_ee80c801\App_Code.DLL" /R:"C:\WINDOWS\assembly\GAC\CrystalDecisions.Enterprise.Framework\10.2.3600.0__692fbea5521e1304\CrystalDecisions.Enterprise.Framework.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0__31bf3856ad364e35\System.Web.Extensions.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\9.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\CrystalDecisions.Web\10.2.3600.0__692fbea5521e1304\CrystalDecisions.Web.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Data.DataSetExtensions\3.5.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Xml.Linq\3.5.0.0__b77a5c561934e089\System.Xml.Linq.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\einventory\5710fe63\87c48ad0\assembly\dl3\b3638bce\00ac8a5d_ee80c801\App_Web_e5xxpjtj.DLL" /R:"C:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.Common\9.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.Common.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\CrystalDecisions.ReportAppServer.ClientDoc\10.2.3600.0__692fbea5521e1304\CrystalDecisions.ReportAppServer.ClientDoc.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Core\3.5.0.0__b77a5c561934e089\System.Core.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\einventory\5710fe63\87c48ad0\assembly\dl3\06f0648b\007749f8_7a2ac801\AjaxControlToolkit.DLL" /R:"C:\WINDOWS\assembly\GAC_MSIL\CrystalDecisions.Shared\10.2.3600.0__692fbea5521e1304\CrystalDecisions.Shared.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\CrystalDecisions.ReportSource\10.2.3600.0__692fbea5521e1304\CrystalDecisions.ReportSource.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\einventory\5710fe63\87c48ad0\App_Web_orkrvr0n.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\einventory\5710fe63\87c48ad0\assembly\dl3\5ec224af\0052285b_ee80c801\App_global.asax.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\CrystalDecisions.CrystalReports.Engine\10.2.3600.0__692fbea5521e1304\CrystalDecisions.CrystalReports.Engine.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions.Design\3.5.0.0__31bf3856ad364e35\System.Web.Extensions.Design.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Design\2.0.0.0__b03f5f7f11d50a3a\System.Design.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll" /out:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\einventory\5710fe63\87c48ad0\App_Web_grnreport.aspx.dfa151d5.trytsolc.dll" /D:DEBUG /debug+ /optimize- /win32res:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\einventory\5710fe63\87c48ad0\kuk9wni-.res" /w:4 /nowarn:1659;1699;1701 /warnaserror-  "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\einventory\5710fe63\87c48ad0\App_Web_grnreport.aspx.dfa151d5.trytsolc.0.cs" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\einventory\5710fe63\87c48ad0\App_Web_grnreport.aspx.dfa151d5.trytsolc.1.cs"


    Microsoft (R) Visual C# 2008 Compiler version 3.5.21022.8
    for Microsoft (R) .NET Framework version 3.5
    Copyright (C) Microsoft Corporation. All rights reserved.

    c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\einventory\5710fe63\87c48ad0\App_Web_grnreport.aspx.dfa151d5.trytsolc.0.cs(230,54): error CS0433: The type 'Microsoft.Reporting.WebForms.ReportDataSource' 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'
    c:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\8.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll: (Location of symbol related to previous error)
    c:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\9.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll: (Location of symbol related to previous error)
    c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\einventory\5710fe63\87c48ad0\App_Web_grnreport.aspx.dfa151d5.trytsolc.0.cs(254,77): error CS0433: The type 'Microsoft.Reporting.WebForms.ReportDataSourceCollection' 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'
    c:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\8.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll: (Location of symbol related to previous error)
    c:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\9.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll: (Location of symbol related to previous error)
    c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\einventory\5710fe63\87c48ad0\App_Web_grnreport.aspx.dfa151d5.trytsolc.0.cs(271,77): error CS0433: The type 'Microsoft.Reporting.WebForms.LocalReport' 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'
    c:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\8.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll: (Location of symbol related to previous error)
    c:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\9.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll: (Location of symbol related to previous error)
    c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\einventory\5710fe63\87c48ad0\App_Web_grnreport.aspx.dfa151d5.trytsolc.0.cs(305,54): error CS0433: 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'
    c:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\8.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll: (Location of symbol related to previous error)
    c:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\9.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll: (Location of symbol related to previous error)

    Sunday, March 9, 2008 12:42 AM

All replies

  • User1805008792 posted

    Try to clear all the temporary files of your application from temprory asp.net folder[c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\] before publishing your site.

    Also make sure that you don't have a reference to reportviewer 8.0 in your application, remove all the references for report viewer 8.0 from your application.

    Checking this refernece will also be useful - http://msdn.microsoft.com/en-us/library/64wh5743.aspx

     

     

     

     

    Sunday, March 9, 2008 6:11 AM
  • User70883468 posted

    Thanks for your reply. I already remove all the reportviewer 8.0 references. But it doesn't help me. Same error occurs. Any other way to accomplish this.

    Sunday, March 9, 2008 7:25 AM
  • User-39929219 posted

    Hi.

    Check your web.config for double declarations of the reportviewer controls, only one should be in place, I had the same problem when this was in my config file:

    <assemblies>
       <add assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
        <add assembly="Microsoft.ReportViewer.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
               
        <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"/>
    </assemblies>
     

    <assemblies> <add assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"></add> <add assembly="Microsoft.ReportViewer.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"></add> <add assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"></add> <add assembly="Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"></add></assemblies>
    Friday, May 2, 2008 10:39 AM
  • User1007942699 posted

    Hi,

    if any person meet this bug , he can fixed it if he remove the following lines from web.config file

        <add assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
        <add assembly="Microsoft.ReportViewer.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
               

    Sunday, February 1, 2009 4:42 PM
  • User1402238791 posted

    I had the problem mentioned above, but none of the above causes/solutions were the source of the problem. 

    I was deploying to a Win2K3 system that was hosting several apps using ReportViewer 8.0.0.0 (VS2005/.NET Framework 2.0), and I was deploying an app using ReportViewer 9.0.0.0 (VS2008/.NET Framework 3.5).

    I fixed it by placing the following lines in the web.config file of the new app I was deploying.

       <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
           <dependentAssembly>
            <assemblyIdentity name="Microsoft.ReportViewer.WebForms" publicKeyToken="b03f5f7f11d50a3a"/>
            <bindingRedirect oldVersion="8.0.0.0-8.1.0.0" newVersion="9.0.0.0"/>
          </dependentAssembly>
        </assemblyBinding>
      </runtime>

    Thursday, February 5, 2009 7:01 PM
  • User-369615853 posted



    This one worked for me.  I took over a project that had some 8.0 versions and I upgraded to .NET 3.5 and was using reportview 9.0



    <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
           <dependentAssembly>
            <assemblyIdentity name="Microsoft.ReportViewer.WebForms" publicKeyToken="b03f5f7f11d50a3a"/>
            <bindingRedirect oldVersion="8.0.0.0-8.1.0.0" newVersion="9.0.0.0"/>
          </dependentAssembly>
        </assemblyBinding>
      </runtime>

    Thanks

    Tuesday, June 30, 2009 8:47 AM
  • User1905088436 posted

    This code worked for me in web.config before the <configuration>  tag ends

     

    <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <dependentAssembly>
            <assemblyIdentity name="Microsoft.ReportViewer.WebForms"
                              publicKeyToken="b03f5f7f11d50a3a" />
            <bindingRedirect oldVersion="8.0.0.0"
                            newVersion="9.0.0.0"/>
          </dependentAssembly>
        </assemblyBinding>
      </runtime>

    this code redirects any version to the one that you required, instead of the specific version you can write in the  * and any version will redirect.

    Tuesday, July 20, 2010 6:54 PM
  • User-1380850617 posted

    Hi,

    I am still getting the same error,even after i have included these lines in my web.config file.

    Can u plz help me? 

    Thursday, August 12, 2010 4:39 AM
  • User-994614794 posted

    Dear SayedCom your suggetion  worked for me thanks, in my case it was 9.0 and 10.0 and i removed 10.0 and it started working

    Tuesday, July 5, 2011 1:24 PM