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...DNN Platform (o...DNN Platform (o...DNN5 Get Module version has changed.DNN5 Get Module version has changed.
Previous
 
Next
New Post
1/13/2009 6:39 PM
 

This is shortened but I have used this in the past to get the moduleInfo.version

 

Dim _Modules As New ModuleController

Dim _ModuleInfo As

DotNetNuke.Entities.Modules.ModuleInfo = _Modules.GetModuleByDefinition(PortalId, "xxx_ModuleName"

xxxModuleVersion = _ModuleInfo.Version

 In DNN 5 it no longer returns the version. The version is now in the Packages table. I can't seem to find the object model for finding the version info from the Packages table. Does anyone know where it is? I really don't want to have to query it. Has the syntax changed? Is there another way to find the module/package version info?

Thanks,

Tom

 


Tom Harris
HowIUseDNN.com
President 9d Interactive
tharris@9di.com

9dtv.com
PracticeNotebooks.com
Frazum.com
BlueDenim.com
 
New Post
1/13/2009 9:38 PM
 

I'm just now starting to look into the many changes that DNN 5 brings to the various entity classes relating to module definitions, desktop modules, etc. so have not yet tried this but can see from the source that the Version property of the ModuleInfo class has been marked as Obsolete. I am surprised, however, that it still does not return the version since it now calls DesktopModule.Version. Perhaps the GetModuleByDefinition method of the ModuleController is not fully populating the ModuleInfo object with the DesktopModuleId which would be used to populate the new DesktopModule property. You might also need to pass PortalId = -1 rather than the current PortalId to GetModuleByDefinition.

You might try the following to see if the version is available this way:

Dim dmInfo As DotNetNuke.Entities.Modules.DesktopModuleInfo
Dim moduleVersion As String

dmInfo = DotNetNuke.Entities.Modules.DesktopModuleController.GetDesktopModuleByDefinition("xxx_ModuleName", PortalId)
If dmInfo Is Nothing Then
     moduleVersion = "Unknown Version"
Else
     moduleVersion = dmInfo.Version
End If

If that doesn't return the version, you would probably need to get it directly from the package (again, the below code has not been tested):

Dim pkgInfo As DotNetNuke.Services.Installer.Packages.PackageInfo
Dim moduleVersion As String

pkgInfo = DotNetNuke.Services.Installer.Packages.PackageController.GetPackageByName("xxx_PackageName")
If pkgInfo Is Nothing Then
      moduleVersion="Unknown Version"
Else
      moduleVersion = pkgInfo.Version.ToString()
End If


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
New Post
1/13/2009 11:53 PM
 

Bill,

I appreciate your help with this!!! I used the second example and it worked perfectly. It would have taken me many hours to track this down going through each object.

If you have Bizmodules UVG 2.4.4 on any installations I will send you a copy of my UVG 9d YouTube Import module for helping. Let me know if you're interested.

Tom


Tom Harris
HowIUseDNN.com
President 9d Interactive
tharris@9di.com

9dtv.com
PracticeNotebooks.com
Frazum.com
BlueDenim.com
 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...DNN5 Get Module version has changed.DNN5 Get Module version has changed.


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