Error :- “Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly ‘Microsoft.ReportViewer.WinForms, Version=13.0.0.0, Culture=neutral”

Background

Running SQL Server Tools, but run into an exception.

Error

Error Image

unhandledException.01.20190626.0731PM

Error Text


Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.ReportViewer.WinForms, Version=13.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.

Trouble Shooting

The cited assembly is Microsoft.ReportViewer.WinForm and the version is 13.0.0.0.

13.0.0.0 maps to SQL Server 2016.

Remediation

Outline

  1. Artifacts
  2. Download the following features
    • Actual :-
      • Report Viewer
        • ENU\x86\ReportViewer.msi
    • Pre-requisite
      • SQLSysClrTypes
        • NU\x64\SQLSysClrTypes.msi
  3. Install Modules
    • Pre-requisite
      • SQLSysClrTypes
        • SQLSysClrTypes.msi
      • Report Viewer
        • ReportViewer.msi
  4. Review Install Modules
    • Report Viewer
      • ReportViewer.msi

Tasks

Artifacts

The cited missing module is “Microsoft.ReportViewer.WinForms” version 13.

Please access SQL Server 2016 Features Pack. The latest service pack is SP2 and it is available here.

Image

featurePack.v2016.SP2.20190626.0710PM

Download Modules

Report Viewer ( x86 )

featurePack.v2016.SP2.download.reportviewer.x86

SQLSysClrTypes ( x64 )

featurePack.v2016.SP2.download.sqlclr.x64

Install Downloaded Modules

  1. Pre-requisites
    • SQLSysClrTypes_x64.msi
  2. Actual
    • ReportViewer.msi

Review Installed Modules

Report Viewer

Report Viewer modules are .Net and they are installed in GAC.

Review Installed Module in GAC
Syntax

gacutil.exe /l

Sample
"C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\gacutil.exe" /l | find "Microsoft.ReportViewer.Common" | find "Culture=neutral"

Output – Image

GAC.Folder.02.20190626.0725PM

Output – Text
  Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL

  Microsoft.ReportViewer.Common, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL

  Microsoft.ReportViewer.Common, Version=13.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL

Review Installed Module in GAC
Syntax

gacutil.exe /l

Sample
dir c:\windows\assembly\GAC_MSIL\Microsoft.ReportViewer.Common
Output – Image

GAC.Folder.01.20190626.0550PM

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s