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
  13. 1 items are tagged with email validation
  14. 1 items are tagged with GMail
  15. 1 items are tagged with Google
  16. 1 items are tagged with Google Apps
  17. 1 items are tagged with IBaseEntity
  18. 2 items are tagged with IdentitySwitcher
  19. 1 items are tagged with IHydratable
  20. 1 items are tagged with Inline Skin Object
  21. 2 items are tagged with Installation
  22. 1 items are tagged with Installer
  23. 1 items are tagged with intellisense
  24. 1 items are tagged with IPropertyAccess
  25. 1 items are tagged with Language
  26. 1 items are tagged with Manifest
  27. 1 items are tagged with moving
  28. 1 items are tagged with OpenForce
  29. 1 items are tagged with Permissions
  30. 1 items are tagged with Profile Properties
  31. 1 items are tagged with PropertyEditorControl
  32. 1 items are tagged with recent projects
  33. 1 items are tagged with regex
  34. 1 items are tagged with Sample Module
  35. 1 items are tagged with Search Results
  36. 2 items are tagged with Skin Object
  37. 1 items are tagged with Skinning
  38. 6 items are tagged with SQL
  39. 1 items are tagged with SQL Server
  40. 1 items are tagged with SQL Server 2008
  41. 1 items are tagged with Table Functions
  42. 2 items are tagged with TellCo
  43. 1 items are tagged with TokenReplace
  44. 2 items are tagged with Too Good to be True
  45. 1 items are tagged with Twitter
  46. 2 items are tagged with UPC
  47. 2 items are tagged with Upgrading
  48. 1 items are tagged with Users
  49. 2 items are tagged with visual studio
  50. 1 items are tagged with Visual Studio 2008

My Twitter Feed...

Thu, 29 Jul 2010 16:45:45 +0200

erikvb: Gettin unhealthy food. Yummy!

Thu, 29 Jul 2010 07:06:10 +0200

erikvb: RT @mashable: Google Makes Custom Web Typography Ridiculously Easy - http://ow.ly/2i8DG

Wed, 28 Jul 2010 05:05:48 +0200

erikvb: @Alyssa_Milano cool, you have a clone AND you are followed by @wilw . I can only dream of achieving the same...

Tue, 27 Jul 2010 22:20:49 +0200

erikvb: http://bit.ly/bwCZdB (Popularity is Everything: A new approach to protecting passwords from statistical-guessing attacks)

Tue, 27 Jul 2010 16:51:58 +0200

erikvb: RT @Telerik: Win an iPad or Telerik Ultimate licenses. Contest details at http://bit.ly/99ep9O [please RT]

Tue, 27 Jul 2010 10:06:20 +0200

erikvb: RT @TimoBreumelhof: Small bugfix for Style Helper #DNN #skin object posted: http://dnnskinextensions.codeplex.com/releases/view/47234

Mon, 26 Jul 2010 18:39:00 +0200

erikvb: @jbrinkman have fun playing with it :)

Mon, 26 Jul 2010 18:34:22 +0200

erikvb: @schotman als het maar droog blijft

Mon, 26 Jul 2010 17:51:38 +0200

erikvb: RT @christoc: RT @DNNCorp Get new insights from #DotNetNuke CEO Navin Nagiah at CMS Critic: http://bit.ly/aqkKwm

Sun, 25 Jul 2010 20:35:09 +0200

erikvb: RT @Heuserkampf: This will be interesting: Facebook lets publishers contact “likers”: http://bit.ly/9orOQN

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