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

HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...How do I set a dependency in my dnn.config fileHow do I set a dependency in my dnn.config file
Previous
 
Next
New Post
11/17/2008 5:12 AM
 

I have created a generic.vb class that I wish to deploy to my DNN project in the App_Code folder so that it can be used by any of my modules.

I have two questions:

 

1. How do I add the copy of this file to the App_Code folder in my module.dnn file?

2. How do I add a dependency for this file to my modules in the dnn.config file? I tried adding "App_Code/Generic.vb" to the dependencied field, but even though the file was present, my module wouldn't install.

 

Any help would be greatly appreciated, thanks


Blue & White hooped blood runs through my veins!
 
New Post
11/17/2008 7:41 AM
 

to install the app_code file, just use a normal file node with the [app_code] token i.e.

    <file>
          <path>[app_code]</path>
          <name>generic.vb</name>
        </file>

You don't set a dependency on a filename, you can set it on core version, framework version, permissions or type dependency. In this case, type would be approriate and you would use the type name from your already installed class i.e.

   <dependencies>
        <dependency type="Type">supahoopsa.Generic</dependency>
      </dependencies>

Cathal


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
11/17/2008 8:47 AM
 

Firstly many thanks for the prompt reply, really appreciated.

If I use the [app_code} token and code you state above:

    <file>
          <path>[app_code]</path>
          <name>generic.vb</name>
        </file>

Then wouldn't the generic.vb get placed in the App_Code/MyModule/Generic.vb?

I would like it to be just app_Code/Generic.

 

As for the dependency, if I have a namespace and class reference as follows:

Namespace RJC

    Public Class RJCGeneric


Would my dependency be coded as:

   <dependencies>
        <dependency type="Type">RJC.RJCGeneric</dependency>
      </dependencies>

 

 

 


 

 


Blue & White hooped blood runs through my veins!
 
New Post
11/17/2008 12:55 PM
 

yes, it would go to your app_code/mymodule folder. AFAIR in 5.0 there is support for writing files to other locations outside the app_code/mymodule and desktopmodules/mymodule folders, but I don't believe it's possible in pre-5.0

As for your type, it's a fully qualified class, so RJC.RJCGeneric is correct.


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
Previous
 
Next
HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...How do I set a dependency in my dnn.config fileHow do I set a dependency in my dnn.config file


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