Will "the Mighty" Strohl

Using the Minimum DotNetNuke® Version Feature

I have been using the minimum DotNetNuke® version feature in my modules for some time now.  It is a great feature in your DNN manifest file that prevents your modules from being installed on unsupported versions.  However, when I upgraded from v4.05.03, it didn't work anymore.

Your manifest file allows you to specify the minimum supported DNN version like so (adapted from this blog post):


The Regular Expression in the "compatibleversions" tag allows you to specify the version your module will work on.  It is not a perfect way to do it, but it works well.  And that worked flawlessly until today, when I tried to install a module with that same expression.  This time, I was told that my DNN version needed to be upgraded, and that the module installation was aborted. 

This was confusing to me since the current version I was installing on was 4.06.02.  That is certainly higher than 4.05.03.  I ran the regular expression through a validator, and at first it didn't match.  I at first realized it was for the most obvious reason.  I needed to escape the periods.  Nope!  Didn't work.

After some testing, I soon realized that the newest version(s) of DNN might not necessarily send back the preceding zero (0) in the major version number.  So, I changed my minimum version to the following example:


The preceding example will allow the module to be installed on any DNN instance as long as it is version 4.05.03 or higher.

blog comments powered by Disqus