无模板模块开发 [英] Templateless Module Development

查看:79
本文介绍了无模板模块开发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在整个DotNetNuke的互联网文档中,这本身非常有用。但是存在一个障碍,我似乎无法解决。 在没有Chris Hammond的模板的情况下如何进行DotNetNuke模块开发?



此模板已被广泛接受,并且利用了其他文档。 / p>

我已经完成以下任务:




  • 已配置的SQL Server数据库

  • 配置的Internet信息系统(绑定)

  • 修改了System32主机文件(用于本地IP反映网站名称)

  • 已安装MSBuild社区任务

  • 已安装DotNetNuke实例



已安装并安装了所有工具现在,我已经在Visual Studio中打开了DotNetNuke的站点,并配置了我的项目以实际构建模块。



我认为,如果我引用DotNetNuke的 .dll 应该足够,但是 Web Forms项目加载所有影响开发的额外垃圾。



有人可以概述没有Visual Studio模板而从头开始构建环境的正确方法吗? ?

解决方案


  1. 设置DNN开发环境,即使您没有使用我的模板我建议使用相同的开发环境方法 http://www.christoc.com/ Tutorials / All-Tutorials / aid / 1

  2. 使用Visual Studio在DNN开发环境中创建一个新的Web应用程序项目,其位置为/ desktopmodules /。 (按照本教程的第9步 http://www.christoc.com/Tutorials/ All-Tutorials / aid / 4

  3. 删除Visual Studio放入WAP项目的所有内容(文件夹,web.config等)。

  4. 在网站的BIN文件夹中添加对DotNetNuke.dll的程序集引用

  5. 右键单击Project属性,然后在项目上设置属性,以使Build位置成为网站的BIN文件夹(../../ bin)

  6. 更改web选项卡具有以下属性设置



    IISUrl:< a href = http://dnndev.me/desktopmodules/MODULENAME rel = nofollow> http://dnndev.me/desktopmodules/MODULENAME



    OverrideIISAppRootUrl:True



    IIS应用程序根URL: http:// dnndev。我


  7. 将ASCX文件添加到您的项目中。 (view.ascx)

  8. 更改ASCX文件的BASE类以从PortalModuleBase继承

  9. 编译模块

  10. 向DNN(主机/扩展名)注册模块

  11. 将模块添加到页面。

TL; DR


  1. 使用模板可以省去步骤2-8和10的麻烦。


Throughout the internet documentation for DotNetNuke is far and wide, this in itself is quite useful. However one hurdle exist and I can't appear to solve it. How do you do DotNetNuke Module development without Chris Hammond's Template?

This template has become so widely accepted and utilizes that no other documentation exists.

I've already accomplished the following:

  • Configured SQL Server Database
  • Configured Internet Information System (Bindings)
  • Modified the System32 Host File (For local IP to reflect web-site Name)
  • Installed the MSBuild Community Task
  • Installed DotNetNuke Instance

Everything is installed and in place, now I have open DotNetNuke's Site into Visual Studio and configure my project to actually build the module.

I figured if I reference the .dll for DotNetNuke that should suffice, but the Web Forms Project loads all this extra garbage that impacts the development.

Could someone outline the proper way to build your environment from scratch without the template for Visual Studio?

解决方案

  1. Setup a DNN Development environment, even if you aren't using my templates I recommend the same dev environment approach http://www.christoc.com/Tutorials/All-Tutorials/aid/1
  2. Using Visual Studio create a new Web Application Project, with a location of /desktopmodules/ in your DNN dev environment. (Follow Step 9 of this tutorial http://www.christoc.com/Tutorials/All-Tutorials/aid/4)
  3. Remove everything that Visual Studio puts into the WAP project (folders, web.config, etc).
  4. Add an assembly reference to DotNetNuke.dll in the website's BIN folder
  5. Right click on the Project properties and set properties on the project to have the Build location be the website's BIN folder (../../bin)
  6. Change the web tab have the following properties set

    IISUrl:http://dnndev.me/desktopmodules/MODULENAME

    OverrideIISAppRootUrl:True

    IIS App Root URL:http://dnndev.me

  7. Add an ASCX file to your project. (view.ascx)
  8. Change the BASE class for the ASCX file to inherit from PortalModuleBase
  9. Compile your module
  10. Register the module with DNN (host/extensions)
  11. Add the Module to a page.

TL;DR

  1. Save yourself the trouble of steps 2-8 and 10 by using the template.

这篇关于无模板模块开发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆