如何使用 NPanday 生成并打包 PDB 文件?

发布于 2024-11-24 08:00:43 字数 911 浏览 5 评论 0原文

我和我的同事正在尝试使用 Maven 构建我们的 C# .NET Web 服务项目。经过一番研究,NPanday 似乎是最好的选择。我们已经成功地让 NPanday 与 NUnit 和本地 Nexus 工件存储库一起工作。

但现在我们想知道是否有一种方法可以创建和打包 .pdb 文件以进行调试(特别是因为我们有一些项目依赖于其他内部项目)。我们正在使用 NPanday 的 dotnet-library 打包类型,但它似乎没有办法做到这一点。

根据文档,看来我们需要使用 custom-lifecycle-maven-plugin 来创建 dotnet-symbols 或 dotnet-archive 包。但我不确定如何使用它。

我的猜测是,使用 custom-lifecycle-maven-plugin 需要添加我们自己的编译和打包(压缩)目标,类似于此处描述的内容: http://docs.codehaus.org/display/MAVENUSER/Using+Maven+to+manage+.NET+projects 但是这样做似乎消除了使用 NPanday 的 maven-compile-plugin 的许多简单性。

谁能帮我解决这个问题吗?谢谢!

免责声明:我和我的同事对 Maven 非常陌生,我们正在努力了解如何最好地将其应用到我们的项目中。另外,为了这个问题,请假设使用 Maven 是没有商量余地的。

My coworkers and I are trying to use Maven to build our C# .NET webservice projects. After some research, NPanday seemed like the best choice. We have been successful in getting NPanday working with NUnit and a local Nexus artifact repository.

But now we're wondering if there is a way to create and package .pdb files for debugging (specifically because we have some projects that depend on other internal projects). We are using the dotnet-library packaging type with NPanday and it doesn't appear to have a way of doing this.

According to the documentation, it would seem that the custom-lifecycle-maven-plugin is what we need to use in order to create dotnet-symbols or dotnet-archive packages. But I'm not sure how to use it.

My guess is that using the custom-lifecycle-maven-plugin would require adding our own compilation and packaging (zipping) goals similar to what is described here: http://docs.codehaus.org/display/MAVENUSER/Using+Maven+to+manage+.NET+projects But doing that seems to remove much of the simplicity of using NPanday's maven-compile-plugin.

Can anyone help me sort this out? Thanks!

Disclaimer: My coworkers and I are very new to Maven and we are struggling to understand how to best apply it to our projects. Also, for the sake of this question, please assume that the use of Maven is non-negotiable.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

初雪 2024-12-01 08:00:43

好吧,既然没有人回应,我就根据我们在工作中学到的知识来回答我自己的问题。我们的解决方案:完全停止使用 NPanday。它不能轻松地进行调试构建。

除了这个特定问题之外,我们还发现了有关 NPanday 的许多其他问题(或至少不太理想)的特征。它使用 C# 编译器 (csc) 而不是 MSBuild,因此我们无法轻松地将 EDMX 用于我们的数据库。此外,我们还必须列出要包含在编译中的每个文件。

我们已迁移到使用 Sonar 的 maven-dotnet-plugin(groupId:org.codehaus.sonar-plugins.dotnet)。我们在定义我们自己的自定义 Maven 执行方面也取得了一些成功。

NPanday 如此令人失望真是太糟糕了。它有一份很棒的简历,但最终我们不得不解雇它,因为它无法完成我们需要的工作。也许有一天它会改进到足以可用。

我认为我们可能能够使用 NPanday 的 custom-lifecycle-maven-plugin 进行调试构建,但在这一点上,NPanday 的作用是什么值得怀疑。当您创建自定义执行时,您可能会避免 NPanday 的痛苦。

Well, since no one responded, I'm answering my own question based on what we learned here at work. Our solution: stop using NPanday altogether. It cannot do debug builds easily.

Aside from this particular issue, we found many other problems (or at least less-than-desirable) traits about NPanday. It uses the C# compiler (csc) instead of MSBuild, so we couldn't easily use EDMX for our database. Also we had to list every file to include with compilation.

We've migrated to using the maven-dotnet-plugin from Sonar (groupId: org.codehaus.sonar-plugins.dotnet). We've also had some success with defining our own custom Maven executions.

It's too bad that NPanday was such a let-down. It had a great resume, but in the end we had to fire it because it wasn't able to do the work we needed. Maybe someday it will improve enough to be useable.

I think we might have been able to make debug builds with with NPanday's custom-lifecycle-maven-plugin, but at that point it's questionable what NPanday is even helpful for. By the time you create custom executions, you might as well just avoid the pain of NPanday.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文