简体   繁体   English

Visual Studio 2005 SQL报表项目-找不到我的自定义程序集

[英]Visual Studio 2005 SQL report project— can't find my custom assembly

I have a SQL Server report project in VS 2005 that won't preview one of my reports. 我在VS 2005中有一个SQL Server报表项目,该项目不会预览我的报表之一。 This report uses a custom assembly with some code we wrote. 该报告使用了带有我们编写的一些代码的自定义程序集。 I've set a reference to this assembly in the Report Properties menu, but whenever I try previewing the report, I get a message that says in part, "Could not load file or assembly ((my assembly)) or one of its dependencies. The system cannot find the file specified." 我在“报告属性”菜单中设置了对此程序集的引用,但是每当我尝试预览报告时,都会收到一条消息,提示部分内容:“无法加载文件或程序集((我的程序集))或其依赖项之一。 该系统找不到指定的文件。”

I'm not sure how else to point the report project to my assembly, or if as the message says, it's a dependency of my assembly that's the problem, how to identify that dependency. 我不确定如何将报表项目指向我的程序集,或者是否如消息所示,问题出在我程序集的依赖项,以及如何识别该依赖项。

I have other reports in this project that don't use the custom assembly, and they run just fine in preview mode. 我在该项目中还有其他报告不使用自定义程序集,并且它们在预览模式下运行良好。 Also, the assembly I'm using is being used by my coworkers in their VS 2005 report projects with no trouble. 另外,我的同事在他们的VS 2005报表项目中使用我正在使用的程序集也没有问题。 So I think it's some setting on my box that's at issue. 因此,我认为问题出在我盒子上的某些设置。

If you have any suggestions I'm happy to hear them, and thanks. 如果您有任何建议,很高兴听到他们的建议,谢谢。

Make sure the custom assembly dll has been deployed correctly. 确保自定义程序集dll已正确部署。 If you run from your local, the dll should be copied to 如果从本地运行,则应将dll复制到

C:\\Program Files\\Microsoft SQLServer\\80\\Tools\\Report Designer C:\\ Program Files \\ Microsoft SQLServer \\ 80 \\ Tools \\ Report Designer

folder on your computer. 计算机上的文件夹。

If you run report from server, then it should be in 如果您从服务器运行报告,则该报告应位于

C:\\Program Files\\Microsoft SQL Server\\MSSQL\\Reporting Services\\ReportServer\\bin C:\\ Program Files \\ Microsoft SQL Server \\ MSSQL \\ Reporting Services \\ ReportServer \\ bin

in the server. 在服务器上。 (please note, if your server have multiple SSRS instances running, the directory might be a little different based on your server configuration.) (请注意,如果您的服务器有多个正在运行的SSRS实例,则根据您的服务器配置,目录可能会有所不同。)

Here's what got me over the hump. 这就是让我不为所动的原因。 It turns out VS 2005 has its own directory locations it looks at for assemblies and config files, separate from SSRS. 事实证明,VS 2005具有其自己的目录位置,用于查找程序集和配置文件,与SSRS分开。 This post describes it well: 这篇文章很好地描述了它:

http://forums.asp.net/t/1010780.aspx/1?SQL+Server+Reporting+Services+2005+Custom+Assembly+Error http://forums.asp.net/t/1010780.aspx/1?SQL+Server+Reporting+Services+2005+Custom+Assembly+Error

The bit about 'rspreviewpolicy.config' is what worked for me. 关于“ rspreviewpolicy.config”的一点对我有用。

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

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