DNN Community Blog

The Community Blog is a personal opinion of community members and by no means the official standpoint of DNN Corp or DNN Platform. This is a place to express personal thoughts about DNNPlatform, the community and its ecosystem. Do you have useful information that you would like to share with the DNN Community in a featured article or blog? If so, please contact community@dnnsoftware.com.

 


Using the DotNetNuke Source Code

dnntipsandtricksDotNetNuke recently moved to an Open Repository that is hosted on CodePlex.  As Phil Beadle recently noted, the synchronization process is now fully operational and is running nightly to ensure that the CodePlex repository mirrors our internal version control system.  Of course, having access to the source code and understanding how to use the source code to get to a working build is two different things.  The source code package that we deliver with each release is slightly modified from our own internal repository in order to minimize confusion for the community.  Over the years the core team has become accustomed to these steps, but for new people, getting DotNetNuke up and running from source code can be a bit daunting.  Hopefully I can help dispel the mystery and make it a little easier to understand why DotNetNuke source code is packaged in this manner.

NOTE:  For the remainder of this post I will assume that you are familiar with DotNetNuke and that your system is already configured.  The source code version of is not intended for people who are just getting started with DotNetNuke.  If you fall into this category then I would recommend starting with one of the install packages to better acquaint yourself with DotNetNuke.  If you use the install version with the Web Platform Installer, then it will ensure you have all the necessary pre-requisites installed.  For more information on installing DotNetNuke you should review the Installation Instructions or watch the Installation Webinar which are available on the downloads page.

The first step in configuring your system is to download the source code.  There are basically three methods for getting the source code:  1) Download the source code package from a packaged release (you can do this from the DotNetNuke Downloads page), 2) Download a specific changeset from CodePlex (each changeset includes the complete source code), 3) Download a version using SVN or TFS (see CodePlex for more information on how to configure your specific version control client).  Regardless of how you get the source code, once complete, you will have everything you need to get DotNetNuke up and running.  Once you have the source code, you will need to extract it to a directory on your system.

After you have downloaded and extracted the source code, you will need to configure the project website.  By default, the included solution file includes a reference to an IIS website at http://localhost/DotNetNuke_Community.  If you don’t want to alter the solution file then you will need to configure IIS with this application.  Open IIS Manger and add the DotNetNuke_Community application to the Default Web Site.  This application should point to the Website directory inside the directory where you extracted DotNetNuke as shown below.

Source-WebsiteDirectory

If you are going to use a different IIS website name then you will need to edit the Solution file to change the website reference.  You really only need to edit the full website URL but I like to keep everything consistent, so I edit all of the locations shown below (click to enlarge).

Source-WebsiteSolution

With the IIS application configured, you are now ready to open the solution file with Visual Studio.  Currently, we only support Visual Studio 2008.  We are working to ensure that DotNetNuke will work correctly with VS 2010 when it launches, but for now you will need to stick with 2008 unless you are comfortable with doing some exploration on your own.  The Source Package should work with Visual Web Developer 2008 without issues.

As Phil noted in his blog, the CodePlex source code version includes references to MSBuild community tasks and will show a warning dialog when first opening the solution file (technically, the error occurs when the individual project files are opened).  If you downloaded the source code from one of the official repositories, then you can safely ignore these warnings.  If however, you received the source-code from a third party, then you should proceed with extreme caution as running external tasks can pose a potential security risk.

Out of the box, the source code does not include a copy of web.config.  This often trips up new users.  Over the years we have changed the standard source code configuration to minimize the chance that someone would accidentally overwrite critical system information that is stored in web.config.  The source code package supports both new installations, as well as upgrading an existing source code installation.  As a result we exclude web.config from the package.  However, we do include both a development.config and a release.config.  The development configuration file is setup to run DotNetNuke in medium trust, with debugging enabled and with a “dnn_” object qualifier in the SqlDataProvider.  These settings will aid in development by ensuring that your code is portable across different DotNetNuke site configurations.  Any changes you make that run in this configuration are likely to work in any other supported DotNetNuke configuration.  To get up and running, you will need to copy either the development or release configuration files to web.config.

The last required step is to build the solution.  We do not include compiled assemblies for core projects in the versioned code. As a result, if you try to run the installation wizard before building the solution you will receive a compilation error.

Source-WebsiteError

If you have followed along and completed every step, you should now have a working version of DotNetNuke open in Visual Studio and ready to begin developing your own modules, providers, skin objects or other extensions. 

WARNING: While technically possible, you should avoid changes to the DotNetNuke core application source code.  Any changes you make may be overwritten by subsequent DotNetNuke versions and may result in the inability to upgrade to later DotNetNuke versions due to incompatibilities.

Comments

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

Comment Form

Only registered users may post comments.

NewsArchives


Aderson Oliveira (3)
Alec Whittington (11)
Alex Shirley (10)
Andrew Nurse (30)
Anthony Glenwright (5)
Antonio Chagoury (28)
Ash Prasad (13)
Benjamin Hermann (25)
Benoit Sarton (9)
Beth Firebaugh (3)
Bill Walker (36)
Bob Kruger (5)
Brice Snow (1)
Bruce Chapman (9)
Bryan Andrews (1)
cathal connolly (52)
Charles Nurse (157)
Chris Hammond (197)
Chris Paterra (55)
Clinton Patterson (25)
Cuong Dang (21)
Daniel Bartholomew (2)
Daniel Mettler (19)
Dave Buckner (2)
Doug Howell (11)
Erik van Ballegoij (30)
Ernst Peter Tamminga (66)
Geoff Barlow (2)
Gifford Watkins (3)
Gilles Le Pigocher (3)
Ian Robinson (7)
Israel Martinez (17)
Jan Blomquist (2)
Jan Jonas (1)
Jaspreet Bhatia (1)
Jenni Merrifield (6)
Joe Brinkman (234)
John Mitchell (1)
Jon Henning (14)
Jonathan Sheely (3)
Jordan Coopersmith (1)
Keivan Beigi (3)
Ken Grierson (10)
Kevin Schreiner (6)
Leigh Pointer (31)
Lorraine Young (60)
Matthias Schlomann (15)
Mauricio Márquez (5)
Michael Doxsey (7)
Michael Tobisch (1)
Michael Washington (202)
Mike Horton (19)
Mitchel Sellers (28)
Nathan Rover (3)
Navin V Nagiah (14)
Néstor Sánchez (31)
Nik Kalyani (14)
Patrick Santry (3)
Peter Donker (50)
Philip Beadle (135)
Richard Dumas (22)
Robert J Collins (5)
Roger Selwyn (8)
Ruben Lopez (1)
Ryan Martinez (1)
Salar Golestanian (4)
Sanjay Mehrotra (9)
Scott McCulloch (1)
Scott S (11)
Scott Willhite (97)
Sebastian Leupold (76)
Shaun Walker (237)
Shawn Mehaffie (17)
Stefan Cullmann (12)
Stefan Kamphuis (12)
Steve Fabian (31)
Timo Breumelhof (24)
Torsten Weggen (1)
Vicenç Masanas (27)
Vincent Nguyen (3)
Vitaly Kozadayev (6)
Will Morgenweck (36)
Will Strohl (140)
William Severance (5)

Copyright 2014 by DNN Corp | Terms of Use | Privacy | Design by Parker Moore Design