zoukankan      html  css  js  c++  java
  • Start to DotNetNuke Module Development CQ

    Supported by Nova Outsourcing

    You can debug DNN module in DNN site either in IIS or in Visual Studio development environment. I personally prefer to debug in Visual Studio environment as it make me feel all the stuffs are placed in the same box. It is also convenient if you want to look into some ascx files or change some settings in config files shipped in DNN.

    Please follow the steps below and I will explain in detail.

    1. Preparation for DotNetNuke modules development
    2. Install the DotNetNuke site in Visual Studio
    3. Preparation for debugging DotNetNuke Modules

    Preparation for DotNetNuke Modules development

    Download the DotNetNuke installation package from http://dotnetnuke.codeplex.com/releases.

    Or you can install it from WebMatrix directly, but it is another thread which is not our concern here.

    Then install the Visual Studio Starter Kit for DotNetNuke. With the help of starter kit, you can start to develop the project of DotNetNuke module.

    image

    However, you could have an alternative to create a project of DotNetNuke module, please refer to Building the DotNetNuke Module in Normal Asp.net Application

    Install the DotNetNuke Site in Visual Studio

    Please follow the steps below to install the DotNetNuke site in Visual Studio.

    1. Unzip the DotNetNuke_Community_xxx_Install.zip file to a folder, let’s say, f:\DotNetNuke_Community_06.02.00_Install\.
    2. Start Visual Studio->File->Open->Web Site, and then select the path f:\DotNetNuke_Community_06.02.00_Install\.
    3. Modify the Properties of DotNetNuke site. Please go to “Modify the Properties of DotNetNuke Site That will Run the Modules” section for more details.
    4. Set the site as startup project.
    5. Press F5 to start the installation process.

    After the installation completes, you can run and debug the modules in the site via Visual Studio.

    Note: When you open the site, the Visual Studio will automatically create a solution for the project. Visual Studio will prompt to select a path for storing the solution file when you click “Save All” or close the Visual Studio. It is recommended to specify a sensible folder for the solution file as the solution file will hold other projects for DotNetNuke module projects.

    Modify the Properties of DotNetNuke Site That will Run the Modules

    Before start the DotNetNuke site in Visual Studio, we will change the settings of the site. Right click the project node of the site and select “Property Pages”. The following screen will represent.

    image

    Select the “Build” section and select “No Build” in “Before running startup page” dropdown list and uncheck “Build Web site as part of solution”.

    Preparation for debugging DotNetNuke Modules

    So far, we have created a Visual Studio solution that containing a project of a DotNetNuke website. We will start to develop DotNetNuke modules. We can create a DotNetNuke module from the template as following screenshot or refer to Building the DotNetNuke Module in Normal Asp.net Application.

    image

    After you install the DotNetNuke module in the site, you can debug it in Visual Studio.

    Note: DotNetNuke is based on the asp.net framework. So to debug the DotNetNuke module, we simply copy the binary files and symbol files(pdb) to bin folder of the DotNetNuke site. Of course, other files, such as ascx, js, css, etc. are necessary to copy.

    Here we will add command lines to the “Build Events” of the DotNetNuke module project.

    copy "$(TargetDir)*.dll" "$(TargetDir)..\..\DotNetNuke_Community_06.02.00_Install\bin\"
    copy "$(TargetDir)*.pdb" "$(TargetDir)..\..\DotNetNuke_Community_06.02.00_Install\bin\"

    image

    The command lines will help you copy the binary files and symbol files to the bin folder of the site to debug.

    Note: Please specify the target path in the copy command corresponding to your development environment.

     

    Now, you can start the site by pressing F5 and specify a break point in the module project to debug.

    I will appreciate if you have any ideas on the article.

    Supported by Nova Outsourcing

  • 相关阅读:
    Syntax error, insert "]" to complete MemberExpression XXX.js (Java Web Project 导入Jquery的文件后报错)
    Unicode 转换成 Ascii (把Unicode 中文字符串输入到文本中)
    Static控件响应鼠标事件
    在Window 7 64位操作系统上安装Oracle 10g 及 配置PLSQL Developer 8.0.4图解
    LPSTR LPCSTR LPWSTR LPCWSTR区别
    C++ Builder 全部API函数列表
    CPropertySheet标签页 实现各个CPropertyPage页面之间的切换
    C#中如何从字符串中提取数字
    如何用SQL统计某个字符在一个字符串中出现的次数
    MVC中--异常详细信息: System.ArgumentNullException: 值不能为 null。 参数名: value
  • 原文地址:https://www.cnblogs.com/czy/p/2584965.html
Copyright © 2011-2022 走看看