为什么我的LocalCopy dll不是从参考项目中的参考项目进行本地复制的?

Ste*_*ger 6 c# vb.net visual-studio visual-studio-2013

我有以下情况:
解决方案

 - Project 1: Web_Application (VB.NET Web Application)
 - Project 2: Code_Library (VB.NET DLL, Referenced in Project 1, References My_Reports, My_SQL)
 - Project 3: My_SQL (Embedded SQL scripts C# DLL, referenced in Code_Library)
 - Project 4: MyReports (C# dll, depends on ReportViewer),  
              referenced in Code_library, copyLocal = true
              unfortunately depends on
                   - Microsoft.ReportViewer.WebForms.dll (copyLocal = true)
                     which depends on
                   - Microsoft.ReportViewer.Common.dll (copyLocal = true)
                   - Microsoft.ReportViewer.ProcessingObjectModel.dll (copyLocal = true)
                   - System.Web.DataVisualization.dll (copyLocal = true)
Run Code Online (Sandbox Code Playgroud)

ReportViewer dll在MyReports项目中设置为localcopy
在Code_Library中,MyReports设置为localcopy
在Web_Application中,Code_Library和MyReports设置为localcopy

这给出了以下非常不满意的结果:
在MyReports中,ReportViewer dll被本地复制到输出目录.
在Code_Library中,MyReports.dll位于输出目录中,但ReportViewer dll不在...
在Web_Application中,CodeLibrary.dll和MyReports.dll位于输出目录中,但ReportViewer dll不在...

为什么?
有什么我可以做的(没有将reportViewer dll添加到我的Web应用程序项目中吗?

我绝对不想将ReportViewer作为依赖性添加到Code_Library,因为那时我必须更新2个位置,如果我想更改为更高版本的ReportViewer.

Sam*_*kin 0

我有几个选择:

  1. GAC 您不想复制的参考资料
  2. 在 app.config 文件中引用它们 - ala this
  3. 添加构建后事件以将文件复制到您需要的位置...

您可以通过启用融合日志记录来检查应用程序在哪里寻找文件。