Answered by:
ReportViewer Control dlls without Installing SQL Server Reporting Servers

Question
-
User438705957 posted
I have built a rdlc report in VS 2013, which works fine in development, but once I attempted to deploy to the Windows 2003 Production box, I ran across the dreaded "Could
not load file or assembly 'Microsoft.ReportViewer.WebForms, Version=11.0.0.0,"
I have done a fair bit of investigation on this issue, but just require confirmation of my conclusion.1. The ReportViewer control passes off requests for database access to the datasources you have specified while building the report, therefore
2. You don't also need to install a full blown version of SQL Server or SQL Server Reporting services on your web server.
3. If you install the Microsoft Report Viewer 2012 Runtime distributable on your webserver, it will install all the necessary dll's to the GAC and the problem is solved.Thanks
Monday, March 2, 2015 6:36 PM
Answers
-
User1564875471 posted
I highly recommend you to install the NuGet package for the report viewer and then when you deploy your app to the production, it will be part of your published version since it's one of the referenced packages.
To install the package, you run this NuGet command from VS Nuget console:
Install-Package Microsoft.Report.Viewer
That command will remove the local references to your local report server controls (references to the program files /Visual stdio files) and will make your solution reference the dlls from the package that will be installed.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Tuesday, March 3, 2015 6:49 AM -
User1711366110 posted
I have done a fair bit of investigation on this issue, but just require confirmation of my conclusion.
1. The ReportViewer control passes off requests for database access to the datasources you have specified while building the report, therefore
2. You don't also need to install a full blown version of SQL Server or SQL Server Reporting services on your web server.
3. If you install the Microsoft Report Viewer 2012 Runtime distributable on your webserver, it will install all the necessary dll's to the GAC and the problem is solved.
Yes, You are on the right path.
For more information, refer & download from the following link :1. http://www.microsoft.com/en-hk/download/details.aspx?id=35747
2. https://www.nuget.org/packages/Microsoft.Report.Viewer
--
with regards,
Edwin- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, March 4, 2015 12:45 AM
All replies
-
User1564875471 posted
I highly recommend you to install the NuGet package for the report viewer and then when you deploy your app to the production, it will be part of your published version since it's one of the referenced packages.
To install the package, you run this NuGet command from VS Nuget console:
Install-Package Microsoft.Report.Viewer
That command will remove the local references to your local report server controls (references to the program files /Visual stdio files) and will make your solution reference the dlls from the package that will be installed.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Tuesday, March 3, 2015 6:49 AM -
User1711366110 posted
I have done a fair bit of investigation on this issue, but just require confirmation of my conclusion.
1. The ReportViewer control passes off requests for database access to the datasources you have specified while building the report, therefore
2. You don't also need to install a full blown version of SQL Server or SQL Server Reporting services on your web server.
3. If you install the Microsoft Report Viewer 2012 Runtime distributable on your webserver, it will install all the necessary dll's to the GAC and the problem is solved.
Yes, You are on the right path.
For more information, refer & download from the following link :1. http://www.microsoft.com/en-hk/download/details.aspx?id=35747
2. https://www.nuget.org/packages/Microsoft.Report.Viewer
--
with regards,
Edwin- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, March 4, 2015 12:45 AM -
User438705957 posted
Thanks Edwin Guru,
I appreciate you confirming my conclusions.
But I don't understand why I would need to install the nuget package.
I have all the dll's I require in development, and don't actually publish apps, I just move the source to Prod thru CopyWebsite.
In order to get the required dll's in Prod, I just get devops to install the Report Viewer Runtime package?Thursday, March 5, 2015 1:53 AM -
User1885962467 posted
Madog - were you successful?
I have a very similar issue, I think. I am trying to install the report viewer on a Windows 2008 R2 web server that does not have SQL Server on it.
When I try to run the report viewer MSI, I get "Setup is missing an installation prerequisite: Microsoft System CLR Types for SQL Server 2014"
So, when I run the SQL Server 2014 Feature Pack to resolve this, I get: "Microsoft OLE DB Provider for DB2 Version 5.0 requires Microsoft Visual Studio 2010 C++ Runtime libraries"
I realized that I was not going to be able to just install the ReportViewer on the server.
So I tried the suggestion you received to install the Nuget Microsoft.Report.Viewer package, and published my application again.
This time when I ran the report I got: "Could not load file or assembly 'Microsoft.SqlServer.Types, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies.
I googled this and found that I should install another Nuget package Microsoft.SQLServer.Types.
This worked.
I also do not understand why it was not sufficient to just install the report viewer on the web server.
Also, I have found that there are issues with the Print function in the report viewer, but that is a different problem.
Monday, March 9, 2015 11:49 AM -
User438705957 posted
G'day Belgie,
The issue has not yet resolved but I believe I know what needs to be done.
Devops have decided to move my app to a webserver farm. I will be the first to go to the new server and so they can afford to experiment a bit with loading the reportviewer package.
I know that the Microsoft.SqlServer.Types are contained in a prerequisite package to the ReportViewer.msi but it looks like there maybe a versioning issue you had with your installation....which you have since solved.
I still don't understand why I need to load the nuget package as I don't "publish" my app. I just move source code up through copywebsite.
Cheers
Monday, March 9, 2015 3:19 PM