繁体   English   中英

找不到程序集,但未在引用列表中

[英]Assembly not found, but not in references list

我将WebAPI项目部署到IIS。

我添加了对ReportViewer.WebForms和ReportViewer.Commons的引用,都带有“ Local Copy = True”。

当我尝试使用ReportViewer类创建“本地报告”时,出现以下错误消息:

Die Datei oder Assembly "Microsoft.ReportViewer.ProcessingObjectModel, Version=10.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" oder eine Abhängigkeit davon wurde
nicht gefunden. Das System kann die angegebene Datei nicht finden.

当我忘记将Commons添加到引用列表时,只有Commons,我也遇到了同样的错误。 我的问题是我无法添加此引用,因为在引用列表中找不到ProcessingObjectModel。

我该怎么办?

虽然我不熟悉ReportViewer命名空间,但在我看来, bin /文件夹中缺少程序集Microsoft.ReportViewer.ProcessingObjectModel.dll。

这可能是由于它是ReportViewer.WebForms或ReportViewer.Commons的依赖项,而不是Web API应用程序的直接依赖项。

尝试将特殊文件夹_bin_deployableAssemblies添加到Web API项目中,然后将Microsoft.ReportViewer.ProcessingObjectModel.dll放入其中。 打开其属性,然后将“生成操作”设置为“无”。 构建时,它应该会自动复制到bin /中。

另外,您也可以从您的应用程序中引用它,但这有点hack。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM