在构建服务器上构建使用 Crystal Reports 的 .NET 程序集
我正在尝试在构建服务器上构建一个使用 Crystal Reports 的 .NET 程序集,而无需安装 Visual Studio 或 Crystal Reports 运行时。
我们在代码中定位的 Crystal Reports 版本是 Visual Studio 2008 附带的版本,我们使用 MSBuild 来构建此项目。
我已将项目中似乎所有引用的 dll 复制到构建服务器上名为 Assemblies 的文件夹中,并尝试在 csproj.user 文件中设置引用路径,并将相同的 PropertyGroup 复制到我的项目中文件但仍然没有运气。我收到的错误类似于下面的示例。
MyFile.cs(5,7):错误 CS0246:类型 或命名空间名称“CrystalDecisions” 找不到(您是否缺少 using 指令或程序集 参考?) [c:\MySolution\MyProject...]
有人对我如何或是否能够使其工作有任何建议吗?
I'm trying to Build a .NET assembly which uses Crystal Reports on a build server without installing Visual Studio or the Crystal Reports Runtime.
The version of Crystal Reports we are targeting in our code is the one that came along with Visual Studio 2008 and we are using MSBuild to build this project.
I've copied what seems to be all of the referenced dlls in my project into a folder called Assemblies on the build server and I've tried setting the reference path in my csproj.user file and also by copying this same PropertyGroup into my project file but still no luck. The error I'm getting looks like the example below.
MyFile.cs(5,7): error CS0246: The type
or namespace name 'CrystalDecisions'
could not be found (are you missing a
using directive or an assembly
reference?)
[c:\MySolution\MyProject...]
Does anybody have any suggestions on how or whether I should be able to get this to work?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看来我在尝试了项目文件中的参考元素后自己可能已经弄清楚了这一点。我的 Crystal Reports 程序集引用现在如下例所示。
更重要的是它有效!
It looks like I may have figured out this one myself after experimenting around with the element for my references in the project file. My Crystal Reports assembly references now look like the example below.
And even more importantly it works!