DNN Blog

Jun 11

Posted by: Charles Nurse
6/11/2006  RssIcon

Edit:  The Wizard is available for download here.

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.

UpgradeWizard_1.png

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.)

UpgradeWizard_2.png

Step 3: Report on Upgrade

When you have chosen all the modules to upgrade, clicking Finish, upgrades the modules, and produces a report log.

UpgradeWizard_3.png

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.

Tags:
Categories:
Location: Blogs Parent Separator Charles Nurse

26 comment(s) so far...


Re: New Module Upgrade Wizard (.NET2) to be made available

Awesome. One code base here we come....

One question. Will the next 4.x release be 4.3 rather than 4.1, or will this functionality be part of a followup to the imminent release?

By pspeth on   6/13/2006

Re: New Module Upgrade Wizard (.NET2) to be made available

Nice. Will there be any Nant scripts in 4.3 to build a specific module for deployment? I read the blog (adef's post?) about doing module development under 4.x yet I am finding it hard to switch paradigms. Can you list any resources or comparisions or steps for that? Thanks.

By brian on   6/13/2006

Re: New Module Upgrade Wizard (.NET2) to be made available

fyi.. BugTracker shows the next release as being called 3.3 and 4.3

By brian on   6/13/2006

Re: New Module Upgrade Wizard (.NET2) to be made available

Re : 4.3 or 4.1

We decided to skip 4.1 and 4.2 so that the minor revision numbers of the v3 and v4 code bases were the same indicating that ~95% of the code is identical. The Wizard will be released in conjunction with the 4.3 release, as a separate download.

This is just another "tool", together with the Starter Kit to help the community transition to .NET 2 (before .NET 3 - read WinFX - is released with Vista in early 2007)

By cnurse on   6/13/2006

Re: New Module Upgrade Wizard (.NET2) to be made available

Great blog Charles. One minor note. In Step 3, shouldn't the Wizard text read "The log on the RIGHT" ;-).

By jbrinkman on   6/13/2006

Re: New Module Upgrade Wizard (.NET2) to be made available

Hi Charles, New Module Upgrade Wizard sounds great. I have done it manually one time and I know that this will save me a lot of time. Thank you.

On the other hand once I have moved a module to ASP.NET 2.0 it will not be synchronized with the DotNetNuke 3.x version. It will be a fork, a lot of new classes and designer are waiting to be used.

What will happen to the Core modules? Will or should they jump to ASP.Net 2.0 after the 4.3 release?

Stefan

By cshark on   6/13/2006

Re: New Module Upgrade Wizard (.NET2) to be made available

Stefan.. unofficial response but if you look at the module forums and blogs you will see some will only work in 3.3/4.3 but in addition to that it implies they will be .net 1.1 modules. I would imagine it being that way until dnn 3.x is dropped (probably before end of year). IMO

By brian on   6/13/2006

Re: New Module Upgrade Wizard (.NET2) to be made available

I think that the module forums and blogs, that are being referred to, are actually saying that the latest version requires either 3.3/4.3.

This is because they have upgraded the modules to support some of the new 3.3/4.3 features., but it is probably fair to say that it won't be ong before some projects drop .NET 1.1 support. This is not neccessarily the same as saying they will drop support for DNN v3.x, as the 3.x code base (since 3.2) will run on .NET 2.

By cnurse on   6/13/2006

Re: New Module Upgrade Wizard (.NET2) to be made available

I know I haven't looked much at DNN4 and VS2005, but will this also help module developers to create PA's? So with a separate .dll file for the module?

By superska on   6/13/2006

Re: New Module Upgrade Wizard (.NET2) to be made available

just to ask again what superska asked.. will commercial module development be as simple as before? development, compiling, distribution...

By brian on   6/13/2006

Re: New Module Upgrade Wizard (.NET2) to be made available

VERY NICE, thank you! But for myself, porting isn't such a big deal. Sure it's a fair amount of work, but it's one-time work. (Still this wizard will help, so thanks again.)

But the real objection I have is to the extra effort to produce a "clean," properly named, obfuscated, commercial looking redestributable....effort repeated with every cycle of bug fix, feature creep, DNN new feature support, etc....effort made a longer, multistep process in .Net 2.0... I thank you for the porting wizard, but how about a tool to simplify the ongoing effort--thanks Mickeysoft!

By RLyda on   6/13/2006

Re: New Module Upgrade Wizard (.NET2) to be made available

The short answer is yes.

But we do not quite have all the tools ready. This tool together with the Item Templates are a step in the right direction.

I would expect that commercal module developers would use either the Web Application Project (but more likely Class Libraries) to develop their code.

This tool is aimed at Hobby Developers and others who wish to use Visual Web Developer (no support for WAP or Class Libraries).

We now have a much richer set of options to work with, and therefore, no single model will work for everyone. Our goal is to provide tools to help developers use the model that suits their needs.

By cnurse on   6/13/2006

Re: New Module Upgrade Wizard (.NET2) to be made available

I only have VWD but thanks to MS I watched some videos and will be getting VS2005 in the mail. Now, I can go back to the old way I guess. Is there anything to read about the differences in vs2003 wap/class vs vs2005? Can we use vs2005 right now the old way? (this should be a forum topic now)

By brian on   6/13/2006

Re: New Module Upgrade Wizard (.NET2) to be made available

We are looking to assist the DotNetNuke enthusiast who previously has been unable to develop modules. 1) The "Website Starter Kit" is the easiest way to get up and running 2) Development with Visual Studio Express is free and easy to use 3) The "Module Upgrade Wizard" is yet another tool to "make things easier".

By AdefWebserver on   6/13/2006

Re: New Module Upgrade Wizard (.NET2) to be made available

and here is the best way convert web project from dnn3.x to wap dnn4.x 4)
http://msdn.microsoft.com/vstudio/default.aspx?pull=/library/en-us/dnvs05/html/WAP.asp

enjoy! :)

By brian on   6/13/2006

Re: New Module Upgrade Wizard (.NET2) to be made available

I would tend to disagree with Charles' comments about the tool being for "Hobby Developers". Recently I have been developing modules for some enterprise level clients leveraging the VS2005 web project model. I am doing this because the client owns the source code that I am developing - therefore there is no reason to compile the module into a distributable assembly ( a task which is generally only required for commercial modules you intend to sell/distribute to others - WITHOUT source code ). Since most consulting work for clients is "work for hire" which means the client gets the source code anyways, the VS2005 web project model is very functional and efficient. Not to mention the VS2005 web project model is extremely RAD since there is no project/build configuration required, you can make source changes on the fly without recompiling the entire project ( a significant time saver ), and I can still create a simple module ZIP package for deployment from development to production. Personally I think some community members get too caught up in the mindset that they need to compile to a custom named assembly - completely ignoring the fact that this is not really a requirement for many projects ( and in fact adds extra unnecesary overhead )

By sbwalker on   6/13/2006

Re: New Module Upgrade Wizard (.NET2) to be made available

and I can still create a simple module ZIP package for deployment from development to production.

what do you recommend, the dnn export module, nant, another solution?

By brian on   6/13/2006

Re: New Module Upgrade Wizard (.NET2) to be made available

I blogged about this back in November ( click here ) but the main points are DotNetNuke has a module installation manifest file ( *.dnn ) which is an XML file that provides configuration instructions when a module is installed into DotNetNuke. The schema for this file has not changed between DotNetNuke 4.0 and 3.0; however, we have added a new token to support the App_Code folder. A snippet of the *.dnn file looks like this:


   [app_code]
  DataProvider.vb


At the moment, in order to package you must copy all the module files into a deployment folder and then ZIP them up. This could be accomplished manually, with a nant script, or a batch file. One of the outstanding tasks which was not included in the 4.3 release was the ability to use the Module Packager within DNN to automatically create the ZIP file. This feature will be available in the subsequent stabilization release, 4.3.1.

By sbwalker on   6/14/2006

Re: New Module Upgrade Wizard (.NET2) to be made available

even though app_code is the .net 2.0 way .. is there a reason not to just use WAP and develop as we were in 3.x?

By brian on   6/14/2006

Re: New Module Upgrade Wizard (.NET2) to be made available

Yes $$$.

WAP requires VS 2005, the app_code way does not, so it can be done in Visual Web Developer (VWD). There is nothing stopping developers setting up their Module Development in WAP (or by using a Class Library instead of app_code). They will just need VS 2005 to do this.

By cnurse on   6/14/2006

Re: New Module Upgrade Wizard (.NET2) to be made available

per the forum,it appears to not be so simple.. is something coming to make it simpler... like the WAP DNN solution?

By brian on   6/14/2006

Re: New Module Upgrade Wizard (.NET2) to be made available

i can not able to down beta/ module upgrad wizard.zip file(dotnet 2 )

By kasivisu76 on   4/19/2007

Re: New Module Upgrade Wizard (.NET2) to be made available

It is very helful for me. But the link to download is died

By cuongcu1978 on   5/28/2008
Gravatar

Re: New Module Upgrade Wizard (.NET2) to be made available

Is this wizard available anywhere???

By Imran on   3/5/2009
Gravatar

Re: New Module Upgrade Wizard (.NET2) to be made available

is there any way to dowload it????

By Nagraj Naik on   4/21/2009
Gravatar

Re: New Module Upgrade Wizard (.NET2) to be made available

fdsfsd

By Nagraj Naik on   4/21/2009
Attend A Webinar
Try An Online Demo
Download DotNetNuke Professional Edition Trial
Have Someone Contact Me

Like Us on Facebook Join our Network on LinkedIn Follow DNN Corporate on Twitter Follow DNN on Twitter

Advertisers

Sponsors

DotNetNuke Corporation

DotNetNuke Corp. is the steward of the DotNetNuke open source project, the most widely adopted Web Content Management Platform for building web sites and web applications on Microsoft .NET. Organizations use DotNetNuke to quickly develop and deploy interactive and dynamic web sites, intranets, extranets and web applications. The DotNetNuke platform is available in a free Community and subscription-based Professional and Enterprise Editions with an Elite Support option. DotNetNuke Corp. also operates Snowcovered.com where users purchase third party apps for the platform.