调试 DotNetNuke 模块

发布于 2024-07-14 16:33:10 字数 490 浏览 6 评论 0原文

DotNetNuke 4.8 模块间通信开发的最佳 VS 解决方案设置是什么?

我目前有一个解决方案,其中包含用于我的 DotNetNuke 模块的多个 Web 应用程序项目 - 并且每个项目中都有带有控件的页面作为测试工具。 这一切都工作得很好,直到我需要模块开始使用 IModuleCommunicator 和 IModuleListener 相互通信 - 但现在我正在进行模块间通信,调试将不再以这种方式进行。

我很好奇其他人如何处理这个问题 - 有没有办法让你的测试页面模拟 Nuke 环境? 你在核武器网站上进行测试吗? 我的解决方案是使用 VSS 进行源代码管理,因此我不想将完整的 nuke 网站作为项目添加到我的解决方案中,因为这会迫使我将其添加到源代码管理中 - 而且我宁愿没有完整的 nuke 网站源头控制。

我已经能够通过附加到本地 IIS 工作进程来进行调试,但这有点痛苦。 有人对如何减轻调试模块间通信的痛苦有任何建议吗?

任何建议将不胜感激。

What is the best VS solution setup for DotNetNuke 4.8 inter-module communication development?

I currently have a solution with multiple Web Application projects in it for my DotNetNuke modules - and in each one of those have pages with the controls on them as a test harness. That all worked fine up until the point where I need the modules to start talking with each other using IModuleCommunicator and IModuleListener - but now that I'm doing inter module communication, debugging won't work out that way anymore.

I'm curious as to how other people handle this - is there a way to have your test pages mock a Nuke environment? Do you test right in a nuke website? My solution is in sourcecontrol using VSS, so I don't want to add the full nuke website as a project in my solution since that would force me to add it to source control - and I'd rather not have a full nuke site in source control.

I've been able to debug by attaching to the local IIS worker process, but that's kind of a pain. Does anyone have any suggestions as to how to ease the pain of debugging inter module communication?

Any suggestions would be greatly appreciated.

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

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

发布评论

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

评论(2

猫弦 2024-07-21 16:33:10

我们倾向于在开发 DotNetNuke 站点中进行测试,通常只是附加到 IIS 工作进程进行调试(只是因为它比使用 F5 重建更快)。

我认为,一般来说,您使用 DNN 提供的功能越多,您在 DNN 环境之外进行测试的能力就越少。 由于 IMC 是一种特定的 DNN 过程,因此在让 DNN 执行该过程之前,您无法进行完整的测试。

We tend to test in a development DotNetNuke site, usually just attaching to the IIS worker process for debugging (just because it's quicker than rebuilding with F5).

I think, in general, the more you're making use of what DNN provides, the less you'll be able to test outside of a DNN environment. Since IMC is a specifically DNN process, you can't have complete testing until you let DNN be the one to perform the process.

策马西风 2024-07-21 16:33:10

经过大量的试验和 错误,这就是我最终得到的结果 - 并且似乎效果很好。

  1. 在模块项目上创建了一个构建后事件,以复制到本地 nuke 站点进行调试。 在“属性/构建事件/构建后事件命令行”下找到...复制 $(TargetDir)$(TargetName).* C:\Inetpub\wwwroot\bin* /y
  2. 更改了 Web 设置以启动 localhost 网站默认。 位于“属性/Web/服务器/使用自定义 Web 服务器”下 - 更改为“http://localhost/
  3. 创建帖子-构建支持类库项目的事件,以将文件复制到本地网络服务器。 也可能只是更改了模块项目上的构建后事件以包含其他文件。

一旦这些设置就位,按 F5 运行项目将启动浏览器并自动附加到 IIS 工作进程。

另外,请记住,如果您在具有 UAC 的计算机(Vista、win 2008、win 7)上运行此程序,则必须以管理员身份运行 VS,因为复制到 wwwroot 并附加到工作进程都需要提升权限。

After lots of trial & error, here's what I ended up with - and seems to work well.

  1. Created a Post-build event on the module project to copy to the local nuke site for debugging. Found under "Properties / Build Events / Post-build event command line" ... copy $(TargetDir)$(TargetName).* C:\Inetpub\wwwroot\bin* /y
  2. Changed the web settings to start the localhost website by default. Found under "Properties / Web / Servers / Use Custom Web Server" - changed to "http://localhost/"
  3. Created post-build events on supporting class library projects to copy file to local webserver as well. Could also have just changed the post-build event on the module project to include the other files.

Once those setting were in place, pressing F5 to run the project will start the browser and automatically attach to the IIS worker process.

Also, keep in mind that if you are running this on a machine with UAC (Vista, win 2008, win 7) you'll have to run VS as an administrator since both the copy to wwwroot and attaching to the worker process require elevated privileges.

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