Friday, September 03, 2010
        Register
   
Product Blog
24

6/13/2008 - Corrected a few typos.  Thanks to Steve Taylor for poiting them out in the fourm.

The Events module source pack from http://www.dnnevents.net is in ASP.NET 2.0/Web Application Project (WAP) model.   After download and unzip the source pack, there is a solution file DotNetNuke.Event.  When using VS 2008 to open the solution file, you may get the errors as shown in the screenshots below (click on image to zoom in):

 error when open project
error when open project 2
error when open project 3

How to setup the source code if you already had an existing DNN development environment?  For me, I have an existing development box with following setup:  Vista Enterprise, Visual Studio 2008 Pro and DNN 4.8.2 source setup.  The Events module consist of 4 projects

  1. DotNetNuke.Events (VB)
  2. DotNetNuke.Events.SqlDataProvider (VB)
  3. DotNetNuke.Events.ScheduleControl (VB)
  4. DotNetNuke.Events.WebControls (C#)

Below are the steps to setup the Events source in the DNN solution (click on image to zoom in):

image Download and setup DNN 4.8.2 Source version.  On my development laptop, I have the DNN web site in the folder C:\dnn\DotNetNuke_04.08.02_Source\Website".  The dnn virtual root is "dnn480" and it can be accessed via http://localhost/dnn480
image
  1. Visit http://www.dnnevents.net
  2. Register and download Events module source code pack
image

Upload the source pack into DNN portal

  • Login as Host
  • Go to Host >> Module Definitions
  • Install Events Source pack
image Use notepad and edit file [DNN_App_Root]\DesktopModules\Events\DotNetNuke.Events.vbproj and change

<UseIIS>True</UseIIS>

to

<UseIIS>False</UseIIS>
image

Add DotNetNuke.Events project to solution

  1. Right mouse click on Solution
  2. Add
  3. Existing project
  4. Select "DotNetNuke.Events.vbproj" from [DNN_App_Root]\DesktopModules\Events

 

 

image Add project DotNetNuke.Events.SqlDataProvider to solution:
  1. Right mouse click on Solution
  2. Add
  3. Existing project
  4. Select "DotNetNuke.Events.SqlDataProvider.vbproj" from [DNN_App_Root]\DesktopModules\Events\Providers\DataProviders\SQLDataProvider

Add project DotNetNuke.Events.ScheduleControl to solution:
  1. Right mouse click on Solution
  2. Add
  3. Existing project
  4. Select "DotNetNuke.Events.ScheduleControl.vbproj" from [DNN_App_Root]\DesktopModules\Events\Controls\DotNetNuke.Events.ScheduleControl
Add project DotNetNuke.Events.WebControls to solution:
  1. Right mouse click on Solution
  2. Add
  3. Existing project
  4. Select "DotNetNuke.Events.WebControls.csproj" from [DNN_App_Root]\DesktopModules\Events\Controls\DotNetNuke.Events.WebControls
image

Update http://localhost/dnn480 project to reference the DotNetNuke.Events, DotNetNuke.Events.SqlDataProvider, DotNetNuke.Events.ScheduleControl, DotNetNuke.Events.WebControls as Project instead of BIN

  1. In the Visual studio solution, right mouse click on project http://localhost/dnn480
  2. Select Property Pages
  3. On the References, remove references of DotNetNuke.Events.* to BIN (dll)
  4. Add references of DotNetNuke.Events.* to Projects instead


Why reference to project?  If making code changes, reference to projects will dynamically display errors (if any)  when updating the code in the project.  However, you must re-compile the project to create DLL when debug code.

image Make the DotNetNuke.Events reference the DotNetNuke.Library instead of DotNetNuke BIN.
image

You might see some errors in the Visual Studio.  The errors will go away after build the solution.  To build:

  1. Right mouse click on the Solution
  2. Select Build Solution
image

Set break point

  • Open the Event.ascx.vb in the DotNetNuke.Event project
  • Set breakpoint at Page_Init event
  • Access the Events module from the web
  • Verify the breakpoint

I was able to use the same procedure to setup Events source pack in the DNN 4.7.

Notice that the above instructions are for VS 2008.  If you have VS 2005, you will need VS 2005 SP1 to support WAP.

If you have questions/comments about this blog, please post them in the DotNetNuke Events Forum

For those who are interested to see the DNN Events database ERD, conversion of project DotNetNuke.Events.WebControls from C# to VB, visit this link.

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