【发布时间】:2016-02-21 20:14:17
【问题描述】:
我有以下情况:
解决方案
- 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)
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,从那时起,如果我想更改为更高版本的 ReportViewer,我必须更新 2 个位置。
【问题讨论】:
-
有问题的 dll 是否是开发机器上 GAC 的一部分?如果是这样,删除它们可能有助于 Visual Studio 实现满足本地依赖关系的需要。
-
@grek4:他们很可能在 GAC 中。我无法删除它们,我没有管理员权限。其他开发人员也没有。我还安装了 SQL Server Express & Management Studio,所以我不能说这些程序集是否安装了标准的 .NET 2.0 安装。此外,如果在 .NET 4.0 应用程序池上运行,.NET 2.0 dll 可能不会出现在生产机器上。
-
我可以理解您不能篡改服务器,但是如果您对自己的开发环境没有管理员权限,因此无法将其调整到目标环境,这是一个组织你公司的问题,你应该把它提出来,而不是在这里寻找解决方法。如果您指出浪费(付费)时间的时间,也许您会获得本地管理员权限。
-
@grek40: 是的,但是向猫解释捕鸟是不好的,而不是向我们的老板解释这一点,你会更幸运。相信我,我们都试过了。此外,他只是不希望任何人安装非法软件。这是一个合法的问题,我想......此外,你几乎可以在没有管理员权限的情况下做任何事情。只是启动/停止服务和 IIS 管理(和 SSL 证书),修改 gac,修改注册表中的 HKLM,你不能这样做。这真的很有趣。
标签: c# vb.net visual-studio visual-studio-2013