How to develop DotnetNuke Module - Setup Development Environment

This is multi-part series on how to write a custom DotnetNuke module as an independent assembly. This series is not about how to add content and configure containers, pages etc. in DNN framework. There are lot of resources available that explain those things in a very details manner. This series of posts are focusing strictly on module development. This post will get you started with getting your development environment set up.

Setting up development environment for DNN module development

I am going to focus mainly on developing DNN module using C#. It does not mean that these concepts do not apply to VB.Net or any other .Net languages. And also I do not have anything against VB.Net. It is just that my main development platform is C#.

Install DNN

First thing you will need is to have DNN site running on your local machine which you will be using to test your modules with. You can download the package from DotNetNuke web site. I will strongly recommend that you download source package instead of just the installation package. This will help you in debugging underlying DNN framework code as well or to step into the implementation to see whats going on. Once you have downloaded the package, follow the installation instructions to get your DNN site up and running on your local machine.

Install DNN Module Project Template

There are few templates available out there that you can download and install in your development environment to use with Visual Studio. I am using Visual Studio 2008 currently so all references I will mention are going to be be targeted to VS2008 environment. I have been using project template published by Engage. They have provided instructions to install it as well. I will put list the set up instructions here as well.

  • Close all instance of Visual Studio on your machine.
  • Save the downloaded project template ZIP file in C:\Documents and Settings\{user name}\My Documents\Visual Studio 2008\Templates\ProjectTemplates\Visual Web Developer. Note that this location is for VS2008 templates. Depending on how you have configured your Visual Studio installation, this location may be different on your machine. Very important that you do not unzip the template compressed file. It needs to be copied as a ZIP file. Otherwise your visual studio will not pick it up.
  • Start Visual Studio instance and select File >New > Project menu option. You should see the new project template installed under My Templates section as shown in picture below. dnn compiled project template

If you can not locate the project template files on Engage web site, let me know. I can try to provide you the template that I use. You will just have to deal with the modifications I have done to it to show my company name and things like that.

Install NANT Build Tool

The project template that you installed from step creates a NANT build file along with other files for module. This NANT build file helps in building and packaging your module correctly. You can compile the project without NANT build tool. But then you will have to make sure that you have packaged the required files. The NANT file generated by this template just takes care of all the steps. If there are some custom requirements, you can always open the NANT file to edit it. You can download latest NANT build tool from Sourceforge.

Now that you have basic infrastructure set up for module development, let's get started with creating our module project. I have created a module that is used to display products from amazon.com based on the product category and search keywords. You will be able to download the whole source for that module in the next post. So lets get started with it.

Developing Amazon.com Products Store Module

Search

Social

Weather

19.0 °C / 66.3 °F

weather conditions Mist

Monthly Posts

Blog Tags