How to avoid version dependency when developing mojoPortal custom features

When developing custom modules for mojoPortal, the standard guidance (e.g. see http://www.mojoportal.com/developmentonwindows.aspx) is to develop against the latest source code. However we have found that a) this leads to slow build times as you are compiling the entire project each time, and b) the resulting module DLLs will only run with the exact referenced mojoPortal DLLs (which have to be deployed into the live site along with the custom module). This means that the live site then cannot be upgraded to the latest deployed release of mojoPortal without also recompiling the custom modules, and redeploying the custom DLLs plus the newly built core DLLs. We are finding that life becomes much easier if you use one of these two methods:

  • Download  the latest mojoPortal deployment files and reference the relevant dll’s from your project.
  • Download the latest mojoPortal source code, build it and then reference the relevant dll’s from your project.

Check the properties of these references and ensure that ‘specific version = false’.

This means that ths custom modules can then be dropped into any deployed mojoPortal site, regardless of version. Well nearly...

The only gotcha I found is when your project references a different version of the same strongly named assembly that mojoPortal does, e.g. AjaxControlToolkit.  You’ll have to change your project to reference the same version as mojoPortal or, if you’re building against the source code rather than deployment build you could rebuild mojoPortal with the dll that your project references.

Comments

Comments are closed on this post.
Find out more