Our company recently upgraded to 4.0 /VS 2005 combination. We started using Dynamic Module Starter template be cause because of the ease and speed of development. One of the stumbling blocks we ran into was storing our module code in SourceSafe. We investigated the using the Compiled Module Template. This met our source control needs, but we now had a few modules we need to migtrate to this new structure. Below is a document explaining the conversion process we use, hopefully helping others avoid a few gotchas we found. Hope this helps!
NOTE: This conversion requires Visual Studio 2005 SP1 and DNN Starter Kit.
1. Uninstall your module from DNN
- Open development portal
- login as "Host"
- Go to Host->Module Definitions.
- Click the pencil icon for your old module
- Towards the middle of edit you page, find the "Delete Files" box Make sure it is NOT checked.
- To the left of the check box, click the uninstall link.
2. Rename your module folder with Desktop modules
3. Open your Visual Studio DNN Development Environment.
4. Create a Compiled Module project
- From the File menu, select "Add->Create New Project..."
- Select Web Category, under "Visual Basic"
- Select "Compiled DNN Module"
- Set "name" to the name of your Module
- Set location to DesktopModules folder of your DNN Development website
- Click "OK"
5. In your newly created project, click "Show All Files" in Solution Explorer.
6. Set "My Project" properties
- Double click on My Project
- Select the "Application" tab
- Blank out the "Root Namespace" field
- Select the "Compile" tab.
- Verify that the path is set to bin directory of your DNN development site.
- Save "My Project" file
7. Remove all files associated with generated project, leaving the folder structure.
8. Migrate Files
- Copy files from your old module folder in DesktopModules and place them in route of your new application
- Copy files from your old module that was in App_Code folder, and place it in the components folder of your new project
9. Update User Controls
- In Each ASCX Code Behind Class
- Remove the "Partial" modifier from the class declaration
- Declare all controls from the ASCX file you will be modifying, similar to what you had to do in VS 2003.
- In Each ASCX File
- Remove the "Code File" attribute from the page declaration
10. Modify .DNN File
- Remove all "File" elements that contain .VB files
- Set <supportsprobingprivatepath>False</supportsprobingprivatepath>
- Add your module .dll to the filelist. The dll name will be the same as your project name.
11. Remove your old module files from DesktopModules and the App_Code folder.
You may want to back these files up incase there is a problem with conversion
12. Test your module
- Start up your development portal
- Login as "Host"
- Go to "module definitions" under the host menu.
- Click "Create New Module"
- Select your dnn file from the "manifest" drop down
- Click "install"
- Add your module to a page.
- Check if it works correctly.