While building Persona Bar in DNN Platform 9.0, we wanted to have minimal code changes in the core. We felt we could build Persona Bar as an add to the core. Therefore, we decided to keep all the Persona Bar bits in a separate source repository. This kept great separation of source, though it created confusion around compilation.
The goal of this blog is to document steps to compile DNN Platform 9.0.1 in it's entirety, including the Persona Bar and the Edit Bar bits.
We have the following source code repositories:
- Dnn.Platform - this contains the core DNN Platform.
- Dnn.AdminExperience.Library - this contains the base Persona Bar Library.
- Dnn.AdminExperience.Extensions - this contains all the Persona Bar extensions such as Users, Roles, Scheduler, etc.
- Dnn.EditBar - this contains the Edit Bar
- Dnn.React.Common - the common ReactJS components which are used by the Persona Bar extensions to provide consistent look and feel across extensions.
Compiling using Source Package
In this blog, we will talk about compiling from the source package only. We will discuss compiling by cloning repo in a separate blog. Let's download the source package DNN_Platform_126.96.36.199_Source.zip from https://github.com/dnnsoftware/Dnn.Platform/releases/tag/v9.0.1
Do not download the "Source code (zip)" or "Source code (tar.gz)". These two files are automatically created by Gihub.
Let's take a quick look at the prerequisites prior to going any further:
- IIS 7+.
- SQL Server 2008 R2+.
- VS2015+ (Community Edition Supported).
- .Net Framework 3.5. This is needed for few modules.
- .Net Framework 4.5+.
- Internet access to automatically download nuget packages from nuget.org.
You will need .Net framework 3.5 also, as some of the modules still depend on it.
Extract Source Zip
It's best to extract the DNN_Platform_188.8.131.52_Source.zip into a folder with smaller name, e.g. c:\dnnsource. Longer folder name may result in max folder / file name limitations during compilation. Given the large number of files, it may take a good couple of minutes to extract. The extracted folder will have 4 sub-folders:
- Platform - The Core DNN Platform
- PB.Lib - Persona Bar Library
- PB.Ext - Persona Bar Extensions
- Edit Bar - Edit Bar
Empty Install\Module folder
Very soon we will go int each of these sub-folders and compile them one by one. The output of each of them will go under Platform\Website\Install\Module folder. Prior to compilation, this folder will have one PlaceHolder.txt file at the beginning.
Compile Solutions in RELEASE mode
Let's open the following solutions in Visual Studio and compile in RELEASE mode. Please don't try msbuild, you may run into issue, best to open Visual Studio IDE and click on Build Solution.
Lots of Zip Files under Install\Module folder
After the compilation in RELEASE mode, you should have total of 49 files in that folder. If you see fewer files, then ensure you did compile in RELEASE mode and that there were no errors. Warnings can be ignored.
- Under IIS, configure a site and point to the full path corresponding to Platform\Website folder, e.g. C:\dnnsource\Platform\Website in my example.
- Ensure that the user running the app pool has read and write permission to this folder.
- Start the site.
- DNN Install Wizard should show up shortly.
- Create a new database in SQL Server and provide it's name and credentials to the wizard.
- Wait for site to finish installation.
- If something doesn't work, then please look at errors here: Platform\Website\Portals\_default\Logs
- Login as username: host and password: dnnhost (or whatever you typed during installation).
- The Admin Experience panel slides out on the left.
- Create pages, users, content, etc.
Point IIS to your website folder.
Make sure you are providing the right database information here
You should see the installation progressing. It usually takes a minute or two to finish.
Persona Bar after Installation
If all goes well, then you should see the Persona Bar. Enjoy!