惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

K
Kaspersky official blog
Martin Fowler
Martin Fowler
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
V
Visual Studio Blog
博客园_首页
Engineering at Meta
Engineering at Meta
The Cloudflare Blog
MongoDB | Blog
MongoDB | Blog
Blog — PlanetScale
Blog — PlanetScale
T
The Blog of Author Tim Ferriss
雷峰网
雷峰网
D
Docker
博客园 - 司徒正美
S
SegmentFault 最新的问题
M
MIT News - Artificial intelligence
博客园 - 叶小钗
博客园 - 三生石上(FineUI控件)
U
Unit 42
J
Java Code Geeks
A
About on SuperTechFans
N
Netflix TechBlog - Medium
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
S
Security Affairs
I
Intezer
Cisco Talos Blog
Cisco Talos Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
B
Blog RSS Feed
P
Privacy & Cybersecurity Law Blog
T
Tenable Blog
T
Threatpost
H
Hacker News: Front Page
G
Google Developers Blog
博客园 - 【当耐特】
Hugging Face - Blog
Hugging Face - Blog
Apple Machine Learning Research
Apple Machine Learning Research
L
Lohrmann on Cybersecurity
大猫的无限游戏
大猫的无限游戏
Google DeepMind News
Google DeepMind News
A
Arctic Wolf
S
Secure Thoughts
GbyAI
GbyAI
NISL@THU
NISL@THU
S
Security @ Cisco Blogs
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Webroot Blog
Webroot Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
O
OpenAI News
Spread Privacy
Spread Privacy
Application and Cybersecurity Blog
Application and Cybersecurity Blog

博客园 - EdisonZ

TFS 服务器更换后工作区无法绑定 导出你的GAC Assembly中的DLLS 查询可用的Nuget服务地址 认识k_BackingField【转】 EntityFramework 中生成的类加注释 Bat命令知识[转] 利用bat批量执行脚本文件 SQL Server 2012 LocalDB 管理之旅 【转】Windows环境下.NET 操作Oracle问题 VS2012下使用 LocalDB [转]无法安装MVC3,一直卡在vs10-kb2483190 “配置系统未能初始化” 解决方法 Jquery EasyUI Form Load自动绑定Checkbox问题 DSOFramer使用说明(转载))) 所有HTTP 状态代码及其定义 swfupload 上传SecurityError Error #2156 什么是HTTP Headers? 如何把彩色网页快速变为灰色网页? IIS 应用程序池设置
MICROSOFT REPORT VIEWER 2012之无法加载相关的dll
EdisonZ · 2014-02-19 · via 博客园 - EdisonZ

使用VS 2012开发报表, 如果是使用的微软的报表控件的话,默认是使用的MICROSOFT REPORT VIEWER 2012,本地开发基本上没问题,但是一发布服务器,就会发现坑了,微软挖坑从来就不打招呼,坑你没商量。

之前使用Report Viewer,只要看到类似“Could not load file or assembly xxx”之类的只要去微软下载中心下载相应的MICROSOFT REPORT VIEWER XX RUNTIME就行了,2012就屌爆了,先提供下载链接如下:

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

装的时候会提示你还需 .NET Framework 4.0 SQL Server System CLR Types 包,这是一种多么奇葩的存在哈。看看安装信息就知道了:

image

    老实的程序员可能就被忽悠着去各种折腾服务器打安装包补丁包了,但是哥怒了,到时还要往其他服务器迁移或者发布咋办呢?这不都得装,这不折腾程序员么?
    本着程序员何必难为程序员的原则,折腾出解决方案如下:

事实上,只需要找到相关的dll就行,那么你需要找到以下dll:

Microsoft.ReportViewer.WebForms.dll(VS安装目录下的ReportViewer目录,如D:\Program Files (x86)\Microsoft Visual Studio 11.0\ReportViewer,你可以从项目引用的这个dll的属性中找到路径)

zh-CHS目录(简体中文语言包,如果你需要别的语言,那么复制其他的,VS安装目录下的ReportViewer目录,如D:\Program Files (x86)\Microsoft Visual Studio 11.0\ReportViewer)

Microsoft.ReportViewer.Common.dll(GAC,注意版本号为11.0.0.0)

Microsoft.ReportViewer.ProcessingObjectModel.DLL(GAC,注意版本号为11.0.0.0)

Microsoft.SqlServer.Types.dll(GAC,注意版本号为11.0.0.0)

如果你不知道如何从GAC中导出DLL文件,那么可以看看这篇文章:

导出你的GAC Assembly中的DLLS

获取到上述文件后,将其放到网站的bin目录即可,报表就可以正常使用了,这样的话,即使迁移或者发布到其他服务器,也不需要安装任何文件了。

另外建议将这些文件纳入源代码管理。