You are here:   Home
  |  Login
DotNetNuke Core Team
Microsoft MVP
 Bookmark this article!
delicious.com delicious.com
digg digg
technorati technorati
reddit reddit
stumbleupon stumbleupon
facebook facebook
google bookmarks google bookmarks
yahoo bookmarks yahoo bookmarks
slashdot slashdot
live live
twitter twitter
DotNetKicks DotNetKicks

Tags

  1. 1 items are tagged with Admin settings
  2. 1 items are tagged with AJAX Extensions
  3. 1 items are tagged with ASP.NET
  4. 2 items are tagged with BBeyond
  5. 1 items are tagged with Caching
  6. 1 items are tagged with Cambrian
  7. 1 items are tagged with CBO
  8. 2 items are tagged with Codeplex
  9. 1 items are tagged with debugging
  10. 1 items are tagged with DotNetNuke
  11. 2 items are tagged with DotNetNuke 5
  12. 1 items are tagged with email validation
  13. 1 items are tagged with Google
  14. 1 items are tagged with IBaseEntity
  15. 2 items are tagged with IdentitySwitcher
  16. 1 items are tagged with IHydratable
  17. 1 items are tagged with Inline Skin Object
  18. 2 items are tagged with Installation
  19. 1 items are tagged with Installer
  20. 1 items are tagged with intellisense
  21. 1 items are tagged with IPropertyAccess
  22. 1 items are tagged with Language
  23. 1 items are tagged with Manifest
  24. 1 items are tagged with moving
  25. 1 items are tagged with OpenForce
  26. 1 items are tagged with Permissions
  27. 1 items are tagged with Profile Properties
  28. 1 items are tagged with PropertyEditorControl
  29. 1 items are tagged with recent projects
  30. 1 items are tagged with regex
  31. 1 items are tagged with Sample Module
  32. 1 items are tagged with Search Results
  33. 2 items are tagged with Skin Object
  34. 1 items are tagged with Skinning
  35. 6 items are tagged with SQL
  36. 1 items are tagged with SQL Server
  37. 1 items are tagged with SQL Server 2008
  38. 1 items are tagged with Table Functions
  39. 2 items are tagged with TellCo
  40. 1 items are tagged with TokenReplace
  41. 2 items are tagged with Too Good to be True
  42. 1 items are tagged with Twitter
  43. 2 items are tagged with UPC
  44. 2 items are tagged with Upgrading
  45. 1 items are tagged with Users
  46. 2 items are tagged with visual studio
  47. 1 items are tagged with Visual Studio 2008

My Twitter Feed...

Fri, 05 Mar 2010 09:25:30 +0100

erikvb: @schotman you probably ran into this already? http://www.simonblog.com/2008/11/14/qr-code-reader-for-iphone-barcodes-zxing/

Wed, 03 Mar 2010 16:22:05 +0100

erikvb: @CuongDang @WillStrohl btw: another reason to use #mixero: it has a global filter

Wed, 03 Mar 2010 15:57:33 +0100

erikvb: @WillStrohl @CuongDang #foursuare yep.. just look at http://pleaserobme.com

Tue, 02 Mar 2010 11:39:20 +0100

erikvb: ok this is weird...RT @cnnbrk: Chile quake might have shortened days on Earth http://on.cnn.com/b3V8Mq

Sat, 27 Feb 2010 11:25:22 +0100

erikvb: @aafvstam its almost 2012 :)

Sat, 27 Feb 2010 11:24:44 +0100

erikvb: RT @superska: Did I mention we (@erikvb @pdonker @superska) kicked off the new Dutch spoken DNN Usergroup today? http://www.dnngg.nl #mv ...

Fri, 26 Feb 2010 22:23:00 +0100

erikvb: fiasco

Fri, 26 Feb 2010 22:19:17 +0100

erikvb: @TimoBreumelhof #Sauerbreij fat chance.. niet zolang mart smeets de dienst uitmaakt

Fri, 26 Feb 2010 22:09:39 +0100

erikvb: first alpine gold medal for the Netherlands #olympics #van2010

Fri, 26 Feb 2010 22:07:15 +0100

erikvb: yesss.. gold for nicolien!

DotNetNuke 5 Extension packaging

Last Updated 02/17/2009
By: Erik van Ballegoij

Today I released my first DNN 5 module (more about that here). It’s taken me on and off about a week to get the module properly packaged. Partly because of lack of documentation about the new extension manifest. So here are the things i found out during the packaging process… hope someone else is helped by this info as well.

HTML in the manifest

When first trying my install, the license I have was completely unreadable. This is because the license text sits inside the manifest, and in the install wizard, this text is just output as is. As luck would have it however, there are no <pre> tags around the license text, so what i did was to use the HTML version of my license, put them in CDATA tags and now, during install, the user sees nicely formatted html text instead of plain text. In the manifest it looks like this:

<license>
    <![CDATA[ (full license text) ]]>
</license>

I then started to experiment, and discovered that the same worked for the owner elemen of the manifest. This is the full owner element i settled upon:

<owner>
    <name>Erik van Ballegoij</name>
    <organization>Apollo Software</organization>
    <url><![CDATA[<a href="http://www.apollo-software.nl">www.apollo-software.nl</a>]]></url>
    <email><![CDATA[<a href="mailto:support@apollo-software.nl">support@apollo-software.nl</a>]]></email>
</owner>

Resource zip

Another thing I was used to doing in DNN 4 was a resource.zip file. In the module install zip would just go the dll’s and the sqldataprovider files, and all the rest sat in the resource file. The nice thing about this is that you dont need to update the dnn file very often (well, except for those sqldataprovider files…), and it is much easier to maintain a correct manifest. It took me some time to find out how this works in DNN 5, since there was not much documentation about this, other than a few blogs by Charles Nurse (links below). With a little help by Charles, i was able to tackle this quite easily, with the following manifest element:

<component type="ResourceFile">
    <resourceFiles> 
<basePath>DesktopModules\ModuleName</basePath> 

         <resourceFile>
        <name>Resources.zip</name> 

        </resourceFile>
    </resourceFiles>
</component>

The cool thing about this is that you can use more than one resource file zips. This will help if you want to include templates or something.

 

Sneaking in skinobjects

The module I released also contains a number of skinobjects. In the DNN 4 version of the module, i used an sql hack to install those skinobjects. In DNN 5 I had the option to include real SKO package definitions inside the manifest, which would probably work just fine. However, i chose not to do that, as i want my skinobjects to uninstall when someone uninstalls the module package. (hmm, in hind sight, I probably could have added a dependency… something i need to look into… ). What i ended up doing what this:

for SKO installation:

INSERT INTO {databaseOwner}[{objectQualifier}Packages] ([Name], [FriendlyName], [Description], [PackageType], [Version], [Owner], [Organization], [Url], [Email], [IsSystemPackage], [License]) VALUES ( N'Apollo.MLNAVSkinObject', N'MLNAV SkinObject', N'This SkinObject is part of the Apollo Pagelocalization Module', N'SkinObject', N'1.0.0', N'Erik van Ballegoij', N'Apollo Software', N'www.apollo-software.nl', N'support@apollo-software.nl', 0, N'See for complete license text: http://www.apollo-software.nl/Over/SoftwareLicense/tabid/77/language/en-US/Default.aspx')
SELECT @PackageId = SCOPE_IDENTITY()
INSERT INTO {databaseOwner}[{objectQualifier}SkinControls] ([PackageID], [ControlKey], [ControlSrc], [IconFile], [HelpUrl], [SupportsPartialRendering]) VALUES (@PackageId, N'MLNAV', N'DesktopModules/PageLocalization/MLNav.ascx', NULL, NULL, 0)

 

for SKO de-installation (goes in uninstall.sqldataprovider):

DELETE FROM {databaseOwner}{objectQualifier}SkinControls WHERE ControlKey IN ('MLNAV','MLBREADCRUMB','MLLINKS','MLMENU','MLPAGETITLE','MLTREEVIEW') AND ControlSrc LIKE '%PageLocalization%'

 

Even though this is a hack, the skinobjects are installed just fine, and uninstalled together with the main module package.

For the sample skins i am providing, I also needed a little trick, but of a different order. I want the skin to install without issue in DNN 5, so no “extension not allowed” errors. As it turns out, DNN 5.0.0 has an issue with .resx files inside skin packages. The .resx extension is not allowed for skins (this issue is solved for DNN 5.0.1). Sadly, the DNN Minimal Extropy skin contains a .resx file used for the TEXT skinobject. I had to remove that file in order for the skin to install without issues.

 

For more info about the DNN 5 extension manifest check out these blog posts by Charles Nurse:

  1. The New Extension Installer Manifest – Part 1, Introduction
  2. The New Extension Installer Manifest – Part 2, Component Installers
  3. The New Extension Installer Manifest – Part 3, The Cleanup Component

 

(this is my first post on this site using Windows Live Writer.. Makes blogging much easier!)

Rate this:
Recent Comments
Thanks for the writeup Erik, I was curious about how you include Resources.zip these days. That'll save me some time in the future for sure.
Posted By: Ian Robinson on 01/21/2009
I thought that the license element was supposed to hold the filename of the license file?
Posted By: Will Strohl on 01/22/2009
@Will: thats definetly not true... I think that is the old DNN 4 authentication provider syntax. The DNN 5 syntax has changed a bit. Same for the Owner element, that used to be the Vendor element in DNN 4...
Posted By: Erik van Ballegoij on 01/22/2009
Thanks for the info, that's helped a lot. Your Resource File section doesn't work, however. You need a resourceFile element around each Name element.
Posted By: Brian Dukes on 02/13/2009
Just to clarify - to quote Charles: "The license text can either be embedded in the manifest - or in an external file." He goes on to say this about the "src" attribute of the license element: "src - the location of the license text - if in an external file"
Posted By: Ian Robinson on 04/18/2009
Thanks for your sharing!
Posted By: Baldwin sun on 04/29/2009

Powered By

DotNetNuke Powered! This site is proudly powered by DotNetNuke.

 

(Advertisements)

My other blogs

Thu, 21 May 2009 18:41:00 +0200

Fri, 01 May 2009 14:57:00 +0200

Wed, 29 Apr 2009 16:11:00 +0200

Mon, 27 Apr 2009 20:33:05 +0200

Wed, 21 Jan 2009 20:13:00 +0100

Mon, 05 Jan 2009 23:00:00 +0100

Fri, 05 Dec 2008 16:45:08 +0100

Sun, 05 Oct 2008 22:23:00 +0200

Wed, 17 Sep 2008 14:07:00 +0200

Sun, 24 Aug 2008 21:23:00 +0200