Thursday, September 18, 2008

Building the DNN News Module With Visual Web Developer 2008

by Phil 'iwonder' Guerra

With all of the new tools available from Microsoft, and so many swift changes in technology, it's really difficult to keep up. I took some time off from DNN development to focus on HPUX System Administration, which is another topic. In the course of that time, Microsoft released the many varieties of Vista, VS2008, SQL2008, SQL2008Express, and Visual Web Developer 2008 among others. Phew, what's a self employed single consultant to do? Can't go out and buy all of the bells and whistles. So, I'm setting up shop again, using nothing but freebies. Of course, many who know me, would say what's different? Nothing, exactly, I did get the more pricey tools as part of payment for consulting work, but I really want to go about just using tools that others have readily available to them. It makes teaching folks how to take care of things themselves much easier.

Anyways, part of the ongoing discussion in the DNN News forums is about how to fix the strict validation of incoming newsfeeds. The validation is done using a xsd that specifies the restrictions of fields used by the module. While you can change the xsd to relax the constraints, you will need to recompile the News module for your changes to take affect. That's where this tidbit comes in...

The primary DNN project comes in 2 flavors at the moment, a vs2005 and vs2008 solution. The DNN News module was built using either vs2008 or vwd2008. So, if you want to make any changes to the module, you need to use one of those tools. In my case, I'm using VWD2008. Since, I'm not really an expert on it, I asked for some help on the forums, which got some pretty terse response, still gave me enough to 'remember' that the missing ingredient in all of my troubles was just to add the missing references in the project.

If you are using MS VWD 2008, it is possible to make your own changes to the News module. Open up the project in VWD2008, and add the references for the following dlls located in the folder where you put dnn \Website\Bin\:

DoteNetNuke.dll
DotnNetNuke.WebUtility.dll
Microsoft.ApplicationBlocks.Data.dll

Then, try a quick rebuild before making any changes. If your setup is acceptable, the project will rebuild successfully, then the module will be ready for more changes. If you have errors, there may be other references to add, but those are the only ones I needed to add.

After you make your changes, just replace the resulting DotNetNuke.Modules.News.dll in your Website\DesktopModules\News\bin folder (or wherever your source is located), into the \Website\Bin folder.

The easiest fix is to relax the constraints that are causing folks so much trouble with their existing feed sources. Thats the next topic...

2 comments:

Anonymous said...

Phil,
you should mention, that you need VWD 2008 SP1 to compile modules. Thanks

WizzoDawg said...

Consider it mentioned. Appreciate the feedback and update. I was late loading the vwd2008 tools, so I think I got SP1 with my version, but I'll check it to ensure I have the correct setup as well.

Thanks, again for the updated info, it's always appreciated.

Post a Comment