I wrote about DotNetNuke as a web application earlier this year, but did not document how to get started developing DotNetNuke modules. Since a simple web search delivers unfiltered results and information on versions 3 thru 6, let’s catch up on the infrastructure needed for DotNetNuke 6::
- Download the MSBuild Community Tasks, an extension to the VS build utility
- Download DNN (New Install or VS Starter Kit) (I am working with 6.1.4, in the meantime 6.1.5 has been released)
- Download the DNN Module Development Template and follow the installation instructions
- Install the MSBuild tasks
- Unzip DotNetNuke.zip into a new directory (under wwwroot or under your development directory)
- Right click on the DNN directory and assign full control for the IIS_IUSRS user (this is the system user that IIS typically uses to access the file system)
In IIS Manager
- create a web application pointing to the DNN directory
- select the web application
- open the .Net Compilation feature, and set Debug = true
- in the Basic Settings dialog, make sure an Application Pool with .Net 2.0 Framework is assigned (Integrated Mode seems to work find)
- select Deactivate Ping in Application Pool to avoid timeouts during debugging
The debugging-related settings are necessary to avoid the error message
The web server is not configured correctly. See help for common configuration errors. Running the web page outside of the debugger may provide further information.
when trying to debug from Visual Studio.
Use SQL Server or SQL Server Express as your database server and
- make sure SQL Authentication is enabled
- create a database for DNN
- create a login for the DNN user
- create a user in the DNN database with the newly created login
- update the TWO connection strings in the DNN web.config file
Point your browser to the web application to make sure the settings are correct, and step thru the installation procedure of DNN.
Start Visual Studio (both 2008 and 2010 seem to work with the project template). To create a DNN module, execute:
- Create project “DotNetNuke C# Compiled Module” inside DesktopModules directory of the DNN installation
- Adjust project settings according to generated Documentation.html
- See also the original blogs here and here describing the usage of the template.
- Edit the project’s .dnn file (copyright, license, readme, etc.)
- Implement the module’s functionality
- Switch to Release mode for 1st deployment and Build
- Build in release mode will generate two zip files in the packages directory, namely [modulename][version]_Install.zip and [modulename][version]_Setup.zip
- In DNN, login as Host, select Host menu, Extensions, hover over the Manage button, start the Install Extension Wizard, and upload the Source.zip from the DesktopModules/MyModule/packages directory
- Installation should not produce any error messages. Click Return.
- Since the uploaded files overwrite the original source files, VS will alert you with a “project changed” message.
Modules can be assigned to categories, but this assignment is performed by the DNN administrator, not the developer.
- In the Admin menu, select Taxonomy
- Click the Edit icon on entry Module_Categories
- Press “Add Term” to add new module category, input the category name, and hit “Create New Term”
- Press “Update” to save
- In Host/Extensions,
- Click the Edit icon on module
- Select the desired Module Category
- Scroll down and press “Update Extension”