I\'m getting the following exception in my Windows Service Application:
System.IO.FileNotFoundException: Could not load file or assembly \'Microsoft
First install SQLSysClrTypes for Ms SQL 2014 and secondly install ReportViewer for ms sql 2014
Restart your application or project, in my case its resolved.
I worked on this issue for a few days. Installed all packages, modified web.config and still had the same problem. I finally removed
<assemblies>
<add assembly="Microsoft.ReportViewer.Common, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
</assemblies>
from the web.config and it worked. No exactly sure why it didn't work with the tags in the web.config file. My guess there is a conflict with the GAC and the BIN folder.
Here is my web.config file:
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
<httpHandlers>
<add verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
</httpHandlers>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<handlers>
<add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
</handlers>
</system.webServer>
</configuration>
here the link to webreports version 12 https://www.nuget.org/packages/Microsoft.ReportViewer.WebForms.v12/12.0.0?_src=template
after the package installed
on your toolbox browse the dll reference it to bin then that's it run the visual studio
Version 12 of the ReportViewer bits is referred to as Microsoft Report Viewer 2015 Runtime and can downloaded for installation from the following link:
https://www.microsoft.com/en-us/download/details.aspx?id=45496
UPDATE:
The ReportViewer bits are also available as a NUGET package: https://www.nuget.org/packages/Microsoft.ReportViewer.Runtime.Common/12.0.2402.15
Install-Package Microsoft.ReportViewer.Runtime.Common
In My cases, After installing Sql server data tools by Visual Studio 2015 installer, problem has been resolved
Here is the screenshot for installing data tools
Parser Error Message: Could not load file or assembly 'Microsoft.ReportViewer.WebForms / Winforms, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.
Microsoft ReportViewer runtime and SQL CLR Types for SQL Server 2014 is required to run and is missing from the server hosting Internet Information Services (IIS) or your application.
Install the following packages on the IIS server and then restart the system:
Download Microsoft ReportViewer runtime
Download Microsoft SQL CLR types for SQL Server 2014
Once restarted connect to Web service / Your app again and verify that the error has been resolved.
Or you cant follow this link to read more.