There has been much discussion since November regarding the new Website "project" that Microsoft introduced in Visual Studio 2005/.NET 2. This Website project model is quite different from the Visual Studio 2003/ .NET 1.1 paradigm.
As a result of this significant change, Microsoft has responded to complaints from the developer community by releasing a new Web Application Project add-in, that closely replicates the Visua Studio 2003/.NET 1.1 project model.
However, we have worked with the new model for nearly a year now, and frankly I like it for Rapid Application Devlopment. In addition, this new model is fully supported by the free Visual Web Developer product.
As part of the Starter Kit package for DNN 4.x, we have included Item templates that allow Module Developers to get a head-start in developing a new module in Visual Web Developer.
We are now pleased to announce that as part of the next release of the 4.x code-base (4.3), we will be providing a "Module Upgrade Wizard", to enable Module developers to quickly port their v3.x modules to the new design environment.
This Wizard is a .NET 2 Windows Forms application so it will need the .NET 2 Framework installed on your local machine, but that is all (no other set-up involved).
There are three steps to the upgrade, and I will outline these steps with screenshots from the Wizard.
Step 1: Choose location of Websites
The first step is to choose the location of your v3 development website (ie the website where your Module Source code is located), and the location of your proposed v4 development website.
Step 2: Choose Module(s) to Upgrade
The next step is to choose the Module(s) you wish to "upgrade" from the list of Modules. (Note, the Wizard lists all Modules based on the Folders that exist in the DesktopModules folder.)
Step 3: Report on Upgrade
When you have chosen all the modules to upgrade, clicking Finish, upgrades the modules, and produces a report log.
Note, the log may be saved (as an rtf file).
So what does the Wizard do.
In general, the wizard scans the v3 Module development folder and copies the files into the appropriate location in the v4 development site.
More specifically:
- code files (.vb or .cs) are copied to the appropriate folder under App_Code.
- user control files (.ascx, .aspx) are copied to the appropraite folder under DesktopModules. In addition their codeBehind attribute is changed to a codeFile attribute.
- the code behind files (.ascx.vb, .ascx.cs etc) are copied to the DesktopModules folder, and a couple of modifications are made.
- Public MustInherit Class, Public Class, and the C# equivalents are changed to Publi Partial Class
- If present the "Controls" region is removed. If control declarations are not included in a "Controls" region then they are not removed (at least in this first version of the wizard). As controls are declared in the .ascx file, the declarations in the codeFile will cause duplicate declaration compile errors. If the wizard doesn't catch these, it is a simple task to manually remove the declarations in Visual Web Developer.
- all other content files are moved to the DesktopModules folder.
- a node is added to web.config for the newly added folder under App_Code. This is especially important for C# modules, as without this node the website will not build.
In most cases, simple Modules will be converted with a few errors remaining and quite probably Syntax Warnings as well, but most of these are quite easy to fix (within minutes). More complicated modules (like our own Forum or Store Modules will require a few hours work to remove the remaining errors).
We hope that this Wizard will allow Module Developers to start porting their existing modules to .NET 2.