Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesMulitple Desktop Modules in PackageMulitple Desktop Modules in Package
Previous
 
Next
New Post
9/30/2010 11:11 PM
 

I'm trying to combine two modules in one package.  They share the same code base (and assembly dll), and in the past, I just included them as individual modules.  However, upgrading to DNN 5, I tried to upgrade the manifest so that both were in one package.  The .dnn file is below.  The problem is that whenever I install this package on any DNN installation, I get an error in the admin control panel under teh module area.  No modules are listed (because of the error).  Evidently, my dnn file is not correct.  I uninstall the package and the error goes away.  I've checked the tables in the DNN database without any success. Any assistance/hints/tips would be greatly appreciated!

The error:

An error has occurred.
DotNetNuke.Services.Exceptions.ModuleLoadException: An entry with the same key already exists. ---> System.ArgumentException: An entry with the same key already exists. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.SortedList`2.Add(TKey key, TValue value) at DotNetNuke.Entities.Modules.DesktopModuleController.GetPortalDesktopModules(Int32 portalID) at DotNetNuke.UI.ControlPanel.AddModule.LoadModuleList() at DotNetNuke.UI.ControlPanel.AddModule.LoadAllLists() at DotNetNuke.UI.ControlPanel.AddModule.Page_Load(Object sender, EventArgs e) --- End of inner exception stack trace ---


The DNN file:

<dotnetnuke type="Package" version="5.0">
<packages>
<package name="Reporter" type="Module" version="00.00.03">
<friendlyName>Reporter</friendlyName>
<description>Custom Reporter module</description>
<owner>
<name>--</name>
<organization>--</organization>
<url>--</url>
<email>--</email>
</owner>
<license>--</license>
<releaseNotes>--</releaseNotes>
<components>
<component type="Script">
<scripts>
<basePath>DesktopModules\Reporter</basePath>
<script type="Install">
<path>Providers\DataProviders\SqlDataProvider</path>
<name>00.00.01.SqlDataProvider</name>
<version>00.00.01</version>
</script>
<script type="UnInstall">
<path>Providers\DataProviders\SqlDataProvider</path>
<name>Uninstall.SqlDataProvider</name>
<version>00.00.01</version>
</script>
</scripts>
</component>

<component type="ResourceFile">
<resourceFiles>
<basePath>DesktopModules/Reporter</basePath>
<resourceFile>
<name>Resources.zip</name>
</resourceFile>
</resourceFiles>
</component>

<component type="Module">
<desktopModule>
<moduleName>Reporter</moduleName>
<foldername>Reporter</foldername>
<businessControllerClass>com.wp.dnn.Reporter.FeatureController</businessControllerClass>
<supportedFeatures />
<moduleDefinitions>
<moduleDefinition>
<friendlyName>Reporter</friendlyName>
<defaultCacheTime>-1</defaultCacheTime>
<moduleControls>
<moduleControl>
<controlKey />
<controlSrc>DesktopModules/Reporter/View.ascx</controlSrc>
<supportsPartialRendering>False</supportsPartialRendering>
<controlTitle />
<controlType>View</controlType>
<iconFile />
<helpUrl />
<viewOrder>0</viewOrder>
</moduleControl>
<moduleControl>
<controlKey>Edit</controlKey>
<controlSrc>DesktopModules/Reporter/Edit.ascx</controlSrc>
<supportsPartialRendering>False</supportsPartialRendering>
<controlTitle>Edit Content</controlTitle>
<controlType>Edit</controlType>
<iconFile />
<helpUrl />
<viewOrder>0</viewOrder>
</moduleControl>
<moduleControl>
<controlKey>Settings</controlKey>
<controlSrc>DesktopModules/Reporter/Settings.ascx</controlSrc>
<supportsPartialRendering>False</supportsPartialRendering>
<controlTitle>ReporterSettings</controlTitle>
<controlType>Edit</controlType>
<iconFile />
<helpUrl />
<viewOrder>0</viewOrder>
</moduleControl>
</moduleControls>
</moduleDefinition>
</moduleDefinitions>
</desktopModule>
</component>

<component type="Module">
<desktopModule>
<moduleName>Reporter Items</moduleName>
<foldername>Reporter</foldername>
<businessControllerClass>com.wp.dnn.Reporter.FeatureController</businessControllerClass>
<supportedFeatures />
<moduleDefinitions>
<moduleDefinition>
<friendlyName>ReporterItems</friendlyName>
<defaultCacheTime>-1</defaultCacheTime>
<moduleControls>
<moduleControl>
<controlKey />
<controlSrc>DesktopModules/Reporter/UserItems.ascx</controlSrc>
<supportsPartialRendering>False</supportsPartialRendering>
<controlTitle />
<controlType>View</controlType>
<iconFile />
<helpUrl />
<viewOrder>0</viewOrder>
</moduleControl>
<moduleControl>
<controlKey>Settings</controlKey>
<controlSrc>DesktopModules/Reporter/UserItemsSettings.ascx</controlSrc>
<supportsPartialRendering>False</supportsPartialRendering>
<controlTitle>Reporter Settings</controlTitle>
<controlType>Edit</controlType>
<iconFile />
<helpUrl />
<viewOrder>0</viewOrder>
</moduleControl>
</moduleControls>
</moduleDefinition>
</moduleDefinitions>
</desktopModule>
</component>

<component type="Assembly">
<assemblies>
<basePath>bin</basePath>
<assembly>
<name>Reporter.dll</name>
</assembly>
</assemblies>
</component>
</components>
</package>
</packages>
</dotnetnuke>
 
New Post
9/30/2010 11:39 PM
 
You have to define 2 diffent Module Defination into the defination section of the manifest file.  You can look at the manifest (*.dnn) file of the ShoutcastStats Module as a sample how this must done.  http://dnnshoutcaststats.codeplex.com
 
New Post
9/30/2010 11:50 PM
 
Thanks for the prompt reply! I had actually defined 2 different module definitions -- but I included them in the same package. The example you gave splits them into two separate packages in the same dnn file. I'm OK with this, but it seems like having two module definition sections like I did above would be simpler if the license/owner/etc (package specific information) was the same. Is the requirement of having only one desktopmodule definition per package by design for DNN?
 
New Post
10/1/2010 5:37 AM
 
there is no UI support for multipart packages, AFAIR Charles Nurse blogged about the packager and manifest a couple of months ago.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
10/1/2010 10:45 AM
 
Matthias, Thanks for the example. The adding the multiple packages (1:1) for the desktop module definition worked perfectly. Sebastian, Thanks for the tip to look into the Charles' blog posts. I did find them, although they are dual-posted on his site and dnn, so it took me a while to check both sources to see if I could find any key hints on this issue. The only thing I found was a passing comment about there being a 1:1 relationship between the DesktopModule and the underlying class definition, which I think would be fair to expect. Even re-reading it, I don't know that I would understand it to refer to the package definition. It seems like it would be beneficial to have some firm documentation on the package installer or maybe an xsd that we could use in visual studio to check our files for compliance. I do have an example xsd that was created by a user (I'd have to go back and find out who posted it) and posted on dnn, but it is incomplete and doesn't capture the 1:1 limit between the package and desktopmodule tags. To further compound the issue, DNN installed it, with the install log appearing to be correct. I appreciate the responses from both of you. I'm fairly new at this, although I've been a long-time dnn user. I look forward to seeing dnn continue to progress, and maybe this will help someone else who may be having similar issues.
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesMulitple Desktop Modules in PackageMulitple Desktop Modules in Package


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out