Learn More





DNN Community Blog

The Community Blog is a personal opinion of community members and by no means the official standpoint of DNN Corp or DNN Platform. This is a place to express personal thoughts about DNNPlatform, the community and its ecosystem. Do you have useful information that you would like to share with the DNN Community in a featured article or blog? If so, please contact .

The use of the Community Blog is covered by our Community Blog Guidelines - please read before commenting or posting.

Using the new Module Development Templates for DotNetNuke 7

imageWith the release of DotNetNuke 7.0 (and now the more recent 7.0.2), it was time to update my module development project templates. If you have worked with my module development templates before, here are the major changes for this release. If you haven’t worked with them before please read this whole blog post as I discuss how to get up and running with the templates.

What’s New

This section will cover some of the “new” features of this template release. If you’re familiar with my previous releases this will hopefully get you up to speed on what is new. If you are new to the whole process it will help you understand a few of the features in the templates.

New DAL2 Templates

The biggest change for the project is that I have added two new DAL2 templates to the project, one for C# and one for VB.Net. These new templates are called DotNetNuke 7 C# DAL2 Compiled Module and DotNetNuke 7 VB.Net DAL2 Compiled Module respectively. As you can see by the name, they use the new DAL2 data access layer available in DotNetNuke 7. Basically you can create a project from one of these two templates and you will have a functioning module (after you build and install of course, see below for those steps) that allows you to create/edit/delete an Item. The Item in the module is pretty simple, with just a few properties, and an ItemController that provides the interaction with the DAL2 and the database. These two templates are a change from previous releases of my template project where the projects you create from the template are empty modules that you have to populate for functionality. With the DAL2 templates it only made sense to provide some out of the box functionality to get you going. You can obviously change the names of the object (Item) and objectcontroller (ItemController) and add additional properties as necessary, be sure to update the SQL script though for any new properties, it can be found in the providers/dataprovider/sqldataprovider folder. For more information on DAL2 check out some of Charles Nurse’s posts here, here, here and here.

New URL (

imageFor some people getting the development environment setup has been the most difficult part of the use of these templates. The old templates used a URL that required you to configure your HOSTS file to spoof a DNS entry, with the new templates you don’t have to do that. The new templates use DNNDEV.ME as the website name/domain name. The public DNS for actually points to, so no matter where you try to access that domain from it will always resolve to your loopback address, perfect for people who have trouble modifying the DNS via the HOSTS file. If you already have your environment setup at DNNDEV you can simply add another host binding in IIS to that same website with the name DNNDEV.ME. If you are new to development, see more information below about configuring your environment.

Support for Visual Studio 2012 Express for Web

One of the requests for the last few releases of the templates has been support for the Visual Studio Express sku. After quite a bit of testing I figured out that the Visual Studio Gallery will not allow my templates to work for both the paid and free SKUs for Visual Studio 2012. I have however come up with a work around for this. If you download the VSIX file from Codeplex you can install the templates in a way that they should work with Express. If you download the template from the Visual Studio Gallery however they won’t. If you don’t need the Express support you can still grab the templates from the gallery which should actually prompt you to upgrade now that a new release is out, if you had the previous release installed.

How to use the Templates

Getting up and running with the templates is actually fairly easy, but you should follow some very specific steps, not following the steps makes it hard for anyone else to be able to assist you as you can configure things any number of ways that might cause problems.

Configuring your Development Environment

This is one of the most important steps of the process, the templates are configured to run in a website under the URL There are a couple of resources for setting up your environment, including this Wiki page, but the easiest approach would likely be to watch this 4 part video series I created for DNN7, as it walks you through setting up a website at The important thing for the new release of the templates is that you must have DNN 7.0.2 (or a newer release as they come) running at, unless of course you modify the templates yourself, but that is outside of the scope of this blog post.

Installing the Templates

Installation of the templates is pretty easy, there are multiple ways to do this, choose one of the three options below and perform the steps listed for the option you choose. You only need to do one of these options, not all three.

  1. Install using the Tools\Extensions and Updates menu in Visual Studio 2012
    1. Mouse over the Tools menu
    2. Click on Extensions and Updates
    3. Search for DotNetNuke
    4. Choose the Install button for the DotNetNuke Project Templates option
  2. Install manually by downloading the VSIX file from the online gallery
    1. Visit the Visual Studio Gallery – DotNetNuke Project Templates page
    2. Download the VSIX file via the Download link.
    3. Double click on the downloaded file to install the templates.
  3. Install manually by downloading from Codeplex
    1. Download the VSIX file from Codeplex
    2. UPDATED - Right Click on the downloaded VSIX and choose Properties
    3. Click on the UNBLOCK button before proceeding
    4. Double click on the downloaded file to install the templates.

Creating your Visual Studio Project

Once you’ve installed the templates, you can setup a project based on the templates. To do so you should follow the steps below

  1. Install Visual Studio 2012 (you should have this done already)
  2. Install the project templates as instructed above
  3. Setup your DotNetNuke Development Environment as instructed above
  4. Run Visual Studio 2012 as an Administrator (right click on the shortcut to do so)
  5. File –> New Project
  6. Choose either C# or VB.Net from the Languages section of the new project dialog
  7. Select the DotNetNuke Folder under your preferred language (C# or Visual Basic)
  8. Choose either DotNetNuke C# Compiled Module, DotNetNuke VB.Net Compiled Module, DotNetNuke 7 C# DAL2 Compiled Module or DotNetNuke 7 VB.Net DAL2 Compiled Module for your project template.
  9. imageFor the new project creation screen using the following settings
    1. Name: ModuleName (something unique here, example MyModule)
    2. Location: c:\websites\\desktopmodules\ (this assumes you setup your development environment as instructed in Step 3)
    3. Solution: Create new solution (this option might not be displayed, that is okay)
    4. Create directory for solution : Unchecked (this will cause path problems if checked, the templates assume the SLN is in the same folder as the project file)
    5. Add to source control: Unchecked (I typically get my project running before adding it to source control)
    6. Click OK

Installing your Module in Development

After you create your project in Visual Studio 2012 the module will exist in the c:\websites\\desktopmodules\MyModule folder, but it is not technically installed and registered with DotNetNuke. To do that you need to perform the follow steps.

  1. Build your project in DEBUG mode.
  2. Change to Release mode and build again.
  3. Login to your development website in a browser, using a HOST/SuperUser account.
  4. Navigate to the Host/Extensions page
  5. Choose the Install Extension Wizard option
  6. Click Choose File
  7. Browse to your c:\websites\\desktopmodules\MyModule\Install\ and choose either the INSTALL or SOURCE package to upload.
  8. Go through the steps for the installation wizard
  9. Place your module on a page (I typically create a new page for each module in my development environment for testing purposes).

Installing your Module in Production

To install your module in production you will follow the same steps as installing it in your development environment, except you will almost NEVER use the SOURCE package of a module in production, it just isn’t necessary.

What’s Next?

So I finally got the 7.0 (7.0.2) templates out the door, what is next? Reworking the DNNTaskManager module that I created a module development tutorial for back in 2011. The plan is to actually rewrite that module from the ground up using DNN 7.0, in three different iterations. 1) Using the original DAL model in DotNetNuke, 2) Using the new DAL2 template, 3) Using ContentItems in DotNetNuke 7. Stay tuned to my blogs for more information as those tutorials are created.

If you like the templates, please give them a rating, either on Codeplex or on the VS Gallery.

This blog is cross posted from


Stuart Fraser
Where do I find the VS2012 express visx on codplex?, I have tried searching but no luck
Stuart Fraser Wednesday, September 18, 2013 4:09 AM (link)
Chris Hammond
Stuart, click on the DOWNLOAD link from the codeplex page linked above...
Chris Hammond Wednesday, September 18, 2013 10:08 AM (link)
Stuart Fraser
Sorry Chris, I had misread the blog.
I have set up my environment as instructed but when trying to install the test module on DNN 7 It asked me to upgrade my version DNN (see error below). I saw mention of DNN 7.02 in your blog but cannot find this version available for download?.
Can you tell me best way to upgrade and what version will work
Failure Install aborted - The module being installed is not compatible with your host application version ( an upgrade is required )
Stuart Fraser Thursday, September 19, 2013 4:12 AM (link)
Chris Hammond
The blog mentioned 7.0.2, not 7.2, as the minimum version for the templates. You can use a newer version of DNN without any problem. You could also modify the templates to use an older version of DNN by modifying the .DNN file
Chris Hammond Thursday, September 19, 2013 11:56 AM (link)
Stuart Fraser
Brill, just what I wanted to hear. Worked a treat
Stuart Fraser Friday, September 20, 2013 3:01 AM (link)

Comment Form

Only registered users may post comments.


2sic Daniel Mettler (124)
Aderson Oliveira (15)
Alec Whittington (11)
Alex Shirley (10)
Andrew Nurse (30)
Anthony Glenwright (5)
Antonio Chagoury (28)
Ash Prasad (21)
Ben Schmidt (1)
Benjamin Hermann (25)
Benoit Sarton (9)
Beth Firebaugh (12)
Bill Walker (36)
Bob Kruger (5)
Brian Dukes (2)
Brice Snow (1)
Bruce Chapman (20)
Bryan Andrews (1)
cathal connolly (55)
Charles Nurse (163)
Chris Hammond (203)
Chris Paterra (55)
Clinton Patterson (28)
Cuong Dang (21)
Daniel Bartholomew (2)
Dave Buckner (2)
David Poindexter (3)
David Rodriguez (2)
Doug Howell (11)
Erik van Ballegoij (30)
Ernst Peter Tamminga (74)
Geoff Barlow (6)
Gifford Watkins (3)
Gilles Le Pigocher (3)
Ian Robinson (7)
Israel Martinez (17)
Jan Blomquist (2)
Jan Jonas (3)
Jaspreet Bhatia (1)
Jenni Merrifield (6)
Joe Brinkman (269)
John Mitchell (1)
Jon Henning (14)
Jonathan Sheely (4)
Jordan Coopersmith (1)
Joseph Craig (2)
Kan Ma (1)
Keivan Beigi (3)
Ken Grierson (10)
Kevin Schreiner (6)
Leigh Pointer (31)
Lorraine Young (60)
Malik Khan (1)
Matthias Schlomann (15)
Mauricio Márquez (5)
Michael Doxsey (7)
Michael Tobisch (3)
Michael Washington (202)
Mike Horton (19)
Mitchel Sellers (28)
Nathan Rover (3)
Navin V Nagiah (14)
Néstor Sánchez (31)
Nik Kalyani (14)
Peter Donker (52)
Philip Beadle (135)
Philipp Becker (4)
Richard Dumas (22)
Robert J Collins (5)
Roger Selwyn (8)
Ruben Lopez (1)
Ryan Martinez (1)
Salar Golestanian (4)
Sanjay Mehrotra (9)
Scott McCulloch (1)
Scott S (11)
Scott Wilkinson (3)
Scott Willhite (97)
Sebastian Leupold (80)
Shaun Walker (237)
Shawn Mehaffie (17)
Stefan Cullmann (12)
Stefan Kamphuis (12)
Steve Fabian (31)
Timo Breumelhof (24)
Tony Henrich (3)
Torsten Weggen (2)
Vicenç Masanas (27)
Vincent Nguyen (3)
Vitaly Kozadayev (6)
Will Morgenweck (37)
Will Strohl (163)
William Severance (5)
Try Evoq
For Free
Start Free Trial
a Demo
See Evoq Live
Need More Information?