none
Could not load file or assembly 'Microsoft.ReportViewer.WebForms.XmlSerializers

    Question

  • I'm calling SSRS reports via ASP.NET Running VS Ultimate 2013 I'm getting the following series of exceptions:

    This one fires about 5 times as I click on continue-

    First-chance exception at 0x00007FFD44ABA1C8 in w3wp.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.

    and lastly I get this one:

    Additional information: Could not load file or assembly 'Microsoft.ReportViewer.WebForms.XmlSerializers, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

    I don't know if they are related, but I've spent hours googling searching for answers.

    I'm not sure where in my code the first exception is occurring, but the last one is on this line of my code:

    ReportViewer1.ServerReport.SetParameters(parms);

    The web project also has these 2 references:

    C:\Program Files (x86)\Microsoft Visual Studio 10.0\ReportViewer\Microsoft.ReportViewer.Common.dll

    C:\Program Files (x86)\Microsoft Visual Studio 10.0\ReportViewer\Microsoft.ReportViewer.WebForms.dll

    Please let me know of any advice for troubleshooting and fixing this.

    Thank you!

    Thursday, November 24, 2016 6:02 AM

All replies

  • Hi moondaddy,

    As far as I know, VS2013 will reference assemblies from

    C:\Program Files (x86)\Microsoft Visual Studio 12.0

    So please make sure that in C:\Program Files (x86)\Microsoft Visual Studio 10.0\ReportViewer\ (it is VS2010) folder has Microsoft.ReportViewer.Common.dll and make sure the folder (C:\Program Files (x86)\Microsoft Visual Studio 10.0\ReportViewer\) exists in your machine.

    I suggest you could delete this two dlls and please refer to the following screenshot:

    Copy the corresponding dlls to the bin folder of your project. then reference them.

    Sincerely,

    Oscar


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, November 28, 2016 3:19 AM
    Moderator
  • Hi Oscar,

    Thank you for the information.  I didn't see the dll refered to in the screenshot above even though I think I should have it.  below is a screenshot of what I do have.

    and when I look in C:\Program Files (x86)\Microsoft Visual Studio 12.0\ReportViewer I'm missing the common dll:

    Any advise on how to proceed?

    Thank you.

    Monday, November 28, 2016 6:42 AM
  • Hi moondaddy,

    Please tried to add references in Visual Studio 2013,

    Right click project -> Add -> Reference... -> Assemblies -> Search "ReportViewer", to find whether has "Microsoft.ReportViewer.WinForms"

    Sincerely,

    Oscar


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, November 28, 2016 7:10 AM
    Moderator
  • I assume you meant "Microsoft.ReportViewer.WebForms" as this is in an asp.net app.  anyway, as you can see in the screenshot below, I have the Microsoft.ReportViewer.WebForms 12.0.0.0 but not Microsoft.ReportViewer.Common 12.0.0.0.  I assume I should have this.  Right?  I have installed VS 2013 ultimate, VS 2015 ultimate, and sql 2014 data tools, BIDs, etc.

    I googled this and found several posts where people were recommended to uninstall the report viewer and install "MICROSOFT® REPORT VIEWER 2015 RUNTIME". 

    First, I don't see where/how to uninstall just the report viewer as it was part of other bigger installations.

    Second, this asp.net app is actually a Silverlight app using asp.net web services on the backend.  because its Silverlight, I have to use VS 2013 as somethings don't work in VS 2015.  Will I still be able to use the reportviewer for VS 2015 in a VS 2013 solution?

    also, as you an see below I have installed 2014 datatools.


    • Edited by moondaddy Monday, November 28, 2016 6:33 PM forgot image
    Monday, November 28, 2016 5:25 PM
  • Hi moondaddy,

    >>I have the Microsoft.ReportViewer.WebForms 12.0.0.0 but not Microsoft.ReportViewer.Common 12.0.0.0.  I assume I should have this.  Right?

    In my VS2015, I also I have two Microsoft.ReportViewer.WebForms 12.0.0 and have no Microsoft.ReportViewer.Common 12.0.0.0.

    Please add the following dll to your project to observe whether has the same issue.

    Microsoft.ReportViewer.Common.dll 10.0.0.0

    Microsoft.ReportViewer.WebForms.dll 10.0.0.0

    Sincerely,

    Oscar


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, November 29, 2016 1:58 AM
    Moderator
  • Hi Oscar,

    Those are the dlls I've been using and yes the problem occurs with them.

    Please see this link:

    http://stackoverflow.com/questions/31169514/microsoft-reportviewer-common-version-12-0-0-0

    According to this, the reportviewer is a separate download.  So my question above still remains, if I install this newer reportviewer, will I be able to reference it in a VS 2013 Solution?

    • Edited by moondaddy Tuesday, November 29, 2016 3:53 AM needed to add content
    Tuesday, November 29, 2016 2:02 AM
  • Hi friend,

    I downloaded it from the NuGet, please refer to the following screenshot:

    and the dll version is 12.0.0.0:

    Sincerely,

    Oscar


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.



    Tuesday, November 29, 2016 8:04 AM
    Moderator
  • Thank you Oscar,

    I will try this, but first, my question still remains:  Can I use the 12.0.0.0 version with a VS 2013 solution?

    Also, I've seen posting recommending to uninstall 10.0.0.0 first.  is this necessary and if so, how do you uninstall it as I don't see it in Control Panel/Programs and Features.

    Tuesday, November 29, 2016 3:15 PM
  • Hi friend,

    >>my question still remains:  Can I use the 12.0.0.0 version with a VS 2013 solution?

    Please refer to the following screenshot, I have not found it has operating restrictions in VS version. Please read the System Requirement:

    >>I've seen posting recommending to uninstall 10.0.0.0 first.  is this necessary and if so, how do you uninstall it as I don't see it in Control Panel/Programs and Features.

    I think this is not necessary, this dll was been included by default when install VS2013. But if we down load the REPORT VIEWER 2015 RUNTIME, we could uninstall it in Control Panel.

    Hope it helpful for you.

    Sincerely,

    Oscar


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, November 30, 2016 2:48 AM
    Moderator
  • OK thanks I'll try it next week when I'm back in the office.  Have a good weekend.
    Friday, December 09, 2016 6:13 PM
  • Thanks Oscar. I followed your instructions and installed v12, and updated the webconfig and the aspx page (which hosts the report) accordingly. Now I get these errors:

    A first chance exception of type 'System.Web.HttpCompileException' occurred in System.Web.dll

    Additional information: External component has thrown an exception.

    If there is a handler for this exception, the program may be safely continued.

    and this one in the aspx page:

    and here's some of the text from the exception.  it seems like there is a conflict between v10 and v12 in the GAC.  Is this correct? 

    Server Error in '/PipelineV2.Web' Application.
    --------------------------------------------------------------------------------

    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\10.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll' and 'c:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\12.0.0.0__89845dcd8080cc91\Microsoft.ReportViewer.WebForms.DLL'

    Source Error:

     

    Line 345:       
    Line 346:        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
    Line 347:        private global::Microsoft.Reporting.WebForms.ReportDataSource @__BuildControl__control10() {
    Line 348:            global::Microsoft.Reporting.WebForms.ReportDataSource @__ctrl;
    Line 349:            

    Source File: c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\pipelinev2.web\3e2eafde\c400ef80\App_Web_velocityreportservice.aspx.be5f5a4a.lawwxp8b.0.cs    Line: 347

    Show Detailed Compiler Output:

    bla bla bla.  too much to paste here.....

    Microsoft (R) Visual C# Compiler version 4.6.1590.0

    for C# 5
    Copyright (C) Microsoft Corporation. All rights reserved.

    This compiler is provided as part of the Microsoft (R) .NET Framework, but only supports language versions up to C# 5, which is no longer the latest version. For compilers that support newer versions of the C# programming language, see http://go.microsoft.com/fwlink/?LinkID=533240

    c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\pipelinev2.web\3e2eafde\c400ef80\App_Web_velocityreportservice.aspx.be5f5a4a.lawwxp8b.0.cs(347,54): error CS0433: The type 'Microsoft.Reporting.WebForms.ReportDataSource' exists in both 'c:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\10.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll' and 'c:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\12.0.0.0__89845dcd8080cc91\Microsoft.ReportViewer.WebForms.DLL'
    c:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\10.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll: (Location of symbol related to previous error)
    c:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\12.0.0.0__89845dcd8080cc91\Microsoft.ReportViewer.WebForms.DLL: (Location of symbol related to previous error)
    c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\pipelinev2.web\3e2eafde\c400ef80\App_Web_velocityreportservice.aspx.be5f5a4a.lawwxp8b.0.cs(371,77): error CS0433: The type 'Microsoft.Reporting.WebForms.ReportDataSourceCollection' exists in both 'c:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\10.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll' and 'c:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\12.0.0.0__89845dcd8080cc91\Microsoft.ReportViewer.WebForms.DLL'
    c:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\10.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll: (Location of symbol related to previous error)
    c:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\12.0.0.0__89845dcd8080cc91\Microsoft.ReportViewer.WebForms.DLL: (Location of symbol related to previous error)
    c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\pipelinev2.web\3e2eafde\c400ef80\App_Web_velocityreportservice.aspx.be5f5a4a.lawwxp8b.0.cs(388,77): error CS0433: The type 'Microsoft.Reporting.WebForms.LocalReport' exists in both 'c:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\10.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll' and 'c:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\12.0.0.0__89845dcd8080cc91\Microsoft.ReportViewer.WebForms.DLL'
    c:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\10.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll: (Location of symbol related to previous error)
    c:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\12.0.0.0__89845dcd8080cc91\Microsoft.ReportViewer.WebForms.DLL: (Location of symbol related to previous error)
    c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\pipelinev2.web\3e2eafde\c400ef80\App_Web_velocityreportservice.aspx.be5f5a4a.lawwxp8b.0.cs(398,54): error CS0433: The type 'Microsoft.Reporting.WebForms.ReportViewer' exists in both 'c:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\10.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll' and 'c:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\12.0.0.0__89845dcd8080cc91\Microsoft.ReportViewer.WebForms.DLL'
    c:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\10.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll: (Location of symbol related to previous error)
    c:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\12.0.0.0__89845dcd8080cc91\Microsoft.ReportViewer.WebForms.DLL: (Location of symbol related to previous error)


    • Edited by moondaddy Wednesday, December 14, 2016 5:32 PM forgot pic
    Wednesday, December 14, 2016 5:18 PM
  • Hi moondaddy,

    >>and here's some of the text from the exception.  it seems like there is a conflict between v10 and v12 in the GAC.  Is this correct? 

    According to above error message, the reason may be caused by version conflict.

    Would you please share me a simple code you used that could let me repro your issue in my side?

    You could upload to One Driver and share a link here.

    Sincerely,

    Oscar


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, December 15, 2016 9:37 AM
    Moderator