DotNetNuke $safeprojectname$ Module
Introduction
To develop DotNetNuke modules using Test Driven Development methodologies the module
solution will contain two projects, one for the $safeprojectname$ module and one for the Unit Tests.
This project contains the Unit Tests and you will now need to add the $safeprojectname$ Module project
to complete the solution.
The Module project also uses MSBuild tasks to make development easier. There is
no need to locate the module you are developing under DesktopModules anymore. Locate
your source files where ever you like and then modify the vbproj file and set the
DNNDirectory to the root of the site you will be using as your development site.
The MSBuild tasks then copy the required files to that web site where you can debug
by attaching to the w3p.exe process.
* Important *
- This test project uses Transaction Scope so you will need to start the DTC Service.
- Make sure you use an object qualifier as in the development.config, the SqlDataProvider
tests rely on it.
Follow these steps .
- Rename this test project to $safeprojectname$.Tests
- Select Add New Reference and find the DotNetNuke.dll assembly in the File Dialog.
- This test project also needs to access the database so you will need to set up the
connection string in the SqlDataProviderFixture.cs file.
- Add a New project and select the TestDrivenDNNModule template and name the project
$safeprojectname$ and put it in a different folder. It is normal to put tests in a subfolder called Tests.
- Edit the Project properties by double-cliking on the My Project folder in Solution
Explorer.
- Make sure that the Application Tab is selected
- Make sure the Root Namespace text-box is empty, and save the Project.
- Select Add New Reference and find the DotNetNuke.dll and Microsoft.ApplicationBlocks.Data
assemblies in the File Dialog.
- Build the Module project and then add a project reference to the $safeprojectname$ Module from the
tests project.
Installing your module
To install your module, browse to your development DotNetNuke website and log in
as a Host (SuperUser) user.
- Browse to the Host/Module Definitions page and select Add Module. In the drop-down
combo at the top of the page select the Manifest file for your new module and click
Install.
- Next browse to the Host/SQL page. Copy the text from the 01.00.00.SqlDataProvider
file, and paste in the text box. Make sure the "Run as script" checkbox is checked
and click Execute.
Your module should now be installed, and you can add it to a page in the usuall
manner.
Further Resources
The information in this page is only an overview. For more information, visit www.dotnetnuke.com.