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...Created custom modules, but where do I place generic code?Created custom modules, but where do I place generic code?
Previous
 
Next
New Post
12/11/2008 8:00 AM
 

Hi,

 

I have created several custom DNN modules for use in my site.  Most of these modules use the same code and I would like to place this 'generic' code in a file that is accessible by all of these modules.  Is this possible?  I know you can create classes or modules (e.g. as in module.vb) in ASP.NET and place these classes/modules in the APP_CODE.

Thanks.

Jimmy

 
New Post
12/11/2008 8:24 AM
 

To share code among several modules it should be compiled as a class library dll that is placed in the website's /bin folder, then referenced in your module project. DNN 5 will provide better support for the installation of assemblies including dependency and I believe version control.


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
12/11/2008 12:22 PM
 

Thanks William, much appreciated

Jimmy

 
New Post
12/11/2008 7:36 PM
 

Yes, be careful in DNN 4.x- as the Installer will overwrite dlls (so if you installed an old version of a module with a common .dll it will replace the new version and crash all modules depending on it. Also, when you uninstall it the Installer will delete the common file which causes all other modules to crash.

This has happened since DNN 1.x - my way around it was to manually copy the code to each project and do version control in the comments - highly inefficient, so I hope the Installer is smarter in 5.x


Entrepreneur

PokerDIY Tournament Manager - PokerDIY Tournament Manager<
PokerDIY Game Finder - Mobile Apps powered by DNN
PokerDIY - Connecting Poker Players

 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Created custom modules, but where do I place generic code?Created custom modules, but where do I place generic code?


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