Now suppose you have a Razor View with some markup that can be targeted by those tag helpers:

12

<plugin-authentication/><plugin-markdownvisible="true"/>

If you run your application, those TagHelper’s won’t work.
This is because you don’t have any @addTagHelper directive yet in your razor view, and so razor doesn’t know it should be using them. This is where things get a bit interesting!

Sources Packages

I have been doing some work on DnnPackager recently, and I’ve come accross the concept of “Source” packages. I have to admit I am not entirely new to these, but I’ve never personally used them for my projects in the past.

Source packages are basically identical to the ordinary install zip’s for your dnn module / extension, i.e you “install” them into your Dnn site like any other install package, except that they also include “source code” files within them, like .cs, .vb files etc.

Tools of the Trade

First Off..

This article is for those of you out there who use Xamarin to write Android applications and want to automate the process of running your tests on an Android device. I’ll show you how you can set this up with relative ease.

ASP (A Sea of Packages).NET 5

When you create a new ASP.NET 5 project, you will see all sorts of new-ness. I am going to guide you, the uninitiated ASP.NET 5 web developer, through creating your first ASP.NET 5 MVC application, but we won’t stop there. In the next post of this series, we will then enhance the project with a number of features:

Bundling and Minification.

Auto browser refresh (as you make changes to files during development)

In addition, I will touch upon important tooling that you need to be aware of:

NPM

Bower and why we are going to replace it with Jspm

Gulp - and why is it useful

To be able to do all of this, we will be creating an ASP.NET MVC 5 project, and then we will be using Aurelia to run an Aurelia application on Home page (Index.cshtml)

Go to the dotnetnuke database, and generate the create scripts (with data).

Create a new console application that uses dbup to run the above sql scripts when it is executed (as described here). Remember to replace things like server name etc in the sql scripts with appropriate $variablename$. Dbup can substitute $variablename$ in the sql scripts with their actual values (which you can pass through from Octopus) before it executes them.

Add OctoPack to your Console Application so that it is packaged up into a NuGet package. Put this NuGet package on your internal NuGet feed.

You should now be in this position:

You have a NuGet package on your feed containing the DotNetNuke website content

You have a NuGet package on your feed containing your wonderful console application (DbUp) which will run the database scripts.

Next Step - to Octopus!

Create a project in Octopus to deploy a “DotNetNuke” website. For the deployment process you will need the NuGet packages prepared previously. The deployment process should:

Create a website in IIS using the website NuGet package.

Create the database by executing the executable within the Database NuGet package.

There are lot’s of things to remember when deploying dotnetnuke. I won’t go into detail but things like:

Granting full permission to the app pool identity that the website runs under to the website folder.

Updating the portalalias table with appropriate access url.

… and other things. The Dnn install process has been covered elsewhere so I won’t go into any further detail here.

Congratulations (partly)

You should now be in a postion where you can roll out a DotNetNuke website via Octopus.. BUT WHAT ABOUT THE MODULES I’M DEVELOPING!! - I hear you exclaim.

Automating Module Deployments

When you build your module projects (via build server etc) you want them packaged as DotNetNuke install packages, inside a NuGet deployment package, which is then published to your NuGet feed. You can use DnnPackager for this (which is something I created).

You’d need something that can copy a set of zip files to the “Install/Module” folder of a DotNetNuke website, and then monitor that folder, whilst calling the DotNetNuke url to install packages (www.dotnetnuke.com/install/install.aspx?mode=installresources). I wrote a quick console application to do this. It repeats calls to that URL all the time the number of zips in the install folder decrements (dotnetnuke deletes them after they are installed). If after x calls, there are the same number of zips left in the directory, it assumes they cannot be installed and reports a failure (return code).
You should package this tool up into a NuGet package and, you guessed it, stick it on your internal feed.

3.Create a project in Octopus for “Module” deployment. You want the deployment process to:

Invoke your deployment tool exe, passing in arguments for where the module zip files were placed, what the website url is, and potentially the path to the Install/Modules folder on disk (although my own tool interrogated IIS based on the website URL to find the website directory)

## Full Congratulations

You will now find that you can create a release of your module project in Octopus and deploy all your lates modules to any DotNetNuke website at the push of a button.