Friday, September 03, 2010
        Register
   
Product Blog
25

In the old DNN 3.X day, you can use the DNN built-in "Create Module Package" to generate the Install and Source distribution packages.  Starting with DNN 4.X, the Create Module Package works well for Web Site Project (WSP) type modules.  However, it does not work as well for Web Application Project (WAP) such as DNN Events module.  In this blog, I will identify the issues when trying to Create Module Package for DNN Events version 4.0.0 in VS 2008/DNN 4.8.2 and the potential work around.

Background - The DNN Events version 4.0.0 was developed using WAP model.  I downloaded the source package from www.dnnevents.com site.  I uploaded the Source pack into DNN (same way as the PA Install version).  After upload, the source code is in the DesktopModules\Events folder.  The DNN Events consists of four projects

  1. DotNetNuke.Events - locate in the folder \DesktopModules\Events\
  2. DotNetNuke.Events.SqlDataProvider - locate in the folder \DesktopModules\Events\Providers\DataProviders\SqlDataProvider\
  3. DotNetNuke.Events.ScheduleControl - locate in \DesktopModules\Events\Controls\DotNetNuke.Events.ScheduleControl\
  4. DotNetNuke.Events.WebControls - locate in \DesktopModules\Events\Controls\DotNetNuke.Events.WebControls\

Figure 1 shows an example of the VS solution after the four projects were added to the solution.

image

Figure 1 - Solution with four DNN Events module projects added to solution

When I using the Create Module Package screen (Figure 2) to create the Install or Source package, I ran into following problems:

  1. Incorrect file references in the manifest file (ex. no reference to DLL or SQL script files)
  2. DLL files missing in the package
  3. SQL script files missing in the packages

image

Figure 1 - Create Module Package screen

I decided to debug the DNN CORE to find out why.  The file PaWriter.vb in the project DotNetNuke.Libarary\Components\Modules contains code to create Install or Source package.  The PaWriter class extract data from the *.??proj file to build the manifest file and create zip package.  The proj file is in XML format.  For example, the PAWriter class contains code to read the Assembly Name (or module compile DLL file name) from the *.??proj file and add the name to the manifest file.  Any files with node None or Include prefix are pulled into the zip package.

The issues I found are

  1. The DotNetNuke.Events contains duplicate Assembly Name (DotNetNuke.Events and DotNetNuke.Modules.Events).  The correct one is DotNetNuke.Modules.Events.
  2. The parsing of the *.??proj is not recursive to child folder.  The DNN Events module consists of 4 projects but the PAWriter class only processes the project file under the \DesktopModules\Events\

Workaround

1.  Remove the duplicate Assembly Name "DotNetNuke.Events" from  the DotNetNuke.Events project file (in solution, first unload project, then edit project and then reload project)

2.  Modify the PaWriter class to recursively check for all project files

Post Rating

Comments

There are currently no comments, be the first to post one.

Post Comment

Only registered users may post comments.

Product Links

Privacy Statement  |  Terms Of Use Copyright 2000-2009 InDyne Commercial Products Corporation