Microsoft report viewer 2012 cannot load related DLL

Geeks, please accept the hero post of 2021 Microsoft x Intel hacking contest>>>

Use vs 2012 to develop reports. If you use Microsoft’s report control, the default is Microsoft report viewer 2012. The local development is basically OK, but once you publish the server, you will find a hole. Microsoft never says hello when digging a hole. You have no business

Before using report viewer, as long as you see something like “ could not load file or assembly XXX", just go to the Microsoft Download Center to download the corresponding Microsoft report viewer XX runtime. 2012 will be a failure. First, provide the download link as follows:

http://www.microsoft.com/zh-cn/download/details.aspx?id=35747

When you install it, you will be prompted that you need the . Net framework 4.0 SQL Server System CLR types package, what a wonderful existence it is. Look at the installation information

an honest programmer may be fooled into going to various tossing servers to make installation packages and patches, but I’m angry, and then I have to migrate to other servers or release them. What should I do?It doesn’t have to be installed. Doesn’t it bother programmers

in line with the principle of why programmers are difficult to be programmers, we have worked out the following solutions:

in fact, you only need to find the relevant DLL, then you need to find the following DLLs:

Microsoft.reportviewer.webforms.dll (the ReportViewer directory under the vs installation directory, such as D:: program files (x86) \ \ Microsoft Visual Studio 11.0 \ \ ReportViewer, you can find the path from the properties of the DLL referenced by the project)

ZH CHS directory (Simplified Chinese language pack, if you need other languages, copy the ReportViewer directory under the other vs installation directory, such as D:// program files (x86)/Microsoft Visual Studio 11.0/ReportViewer)

Microsoft.reportviewer.common.dll (GAC, note version 11.0.0)

Microsoft.reportviewer.processingobjectmodel.dll (GAC, note version 11.0.0)

Microsoft.sqlserver.types.dll (GAC, note version 11.0.0)

If you don’t know how to export DLL files from GAC, take a look at this article:

export DLLs in your GAC assembly

After obtaining the above files, you can put them in the bin directory of the website, and the report can be used normally. In this way, even if you migrate or publish to other servers, you don’t need to install any files

In addition, it is suggested that these files be included in source code control

Similar Posts: