Dependency section of a DNN manifest file
Dependencies Section
The dependencies section was introduced in the DNN’s manifest file with the new installation mechanism. Intending to support true extensions based deployment philosophy in DNN where one package may contain various different types of components.
Dependencies as the name suggest provide a check and validation for installation to continue. Different types of validations can be performed identified by the type attribute value in the dependency section as following,
<dependencies>
<dependency type="Type|CoreVersion|Package|Permission"></dependency>
</dependencies>
Note: A manifest file with no dependencies is defined as following,
<dependencies />
The dependency is usually found at following location in the manifest file,
type=TypeType is used to represent a class. Please note that fully qualified name of the class must be supplied. In type you can specify any class from any other module. For example to ensure that user defined table module is installed,
<dependencies>
<dependency type="Type">DotNetNuke.Modules.UserDefinedTable.UserDefinedTableController</dependency>
</dependencies>
type=CoreVersion
CoreVesion specifies the minimum core version of DNN that must be present for the package to be installed. For example below snippet ensures that this package can be installed on sites running on top of DNN’s 05.05.01 version or above,
<dependencies>
<dependency type="CoreVersion">05.05.00</dependency>
</dependencies>
type=Package
A type of Package refers to the check on name (not the friendly name) of the package that must be installed prior to installation of this module. For example, a rule like this would mean,
<dependencies>
<dependency type="Package">SampleModule</dependency>
</dependencies>
That a package “SampleModule” is already installed with manifest file as following,
<dotnetnuke type="Package" version="5.0">
<packages>
<package name="SampleModule" type="Module" version="01.00.07">
<friendlyName>A sample Module</friendlyName>
type=Permission
Permission type refers to the ability to specify the core .NET permission set required for this module to be operational. In case of installations on shared web hosting this is a great feature to be utilized. For example the dependency below,
<dependencies>
<dependency type="Permission">System.Web.AspNetHostingPermission</dependency>
</dependencies>
ensures that the trust level of the executing DNN website application is higher enough to access protected ASP .NET classes. Examples include the use of classes encapsulated within System.Diagnostic namespace while your site is running with minimal trust level on a shared hosting.
Thus if your code does utilize such a class, having a dependency rule like above will help you protect your module customer’s websites going down by restricting module installation while also prompting a message giving insight why the installation couldn’t be carried out.
Most important types of permissions are exposed under System.Security.Permissions namespace like,
- EnvironmentPermission
- SecurityPermissions
For more information of permissions please take a look at,
http://msdn.microsoft.com/en-us/library/system.security.permissions.aspx
Mixing Dependency Types
It is possible to mix different dependencies together to make up a strict validation rule to be met for installation to continue. This may be required in some cases. An example is to install a module that requires SSL powered DNN (which was in 5.4.0 I believe) and a custom module (FileTransferModule) be installed,
<dependencies>
<dependency type="CoreVersion">05.04.00</dependency>
<dependency type="Package">FileTransferModule</dependency>
</dependencies>
About Me
Usman ur Rehman Ahmedis known as a software engineer in Lahore, Pakistan. He is renowned for having an abstract understanding of vast range of technological developments such as programming languages, web development, RIA's and documental writing, and is mainly specialized in developmental analysis.
Tags
- windows phone 7 (15)
- DNN (14)
- Dot Net Nuke (13)
- .NET (5)
- c# (5)
- manifest (4)
- Application (3)
- MySql (3)
- Provider (3)
- Sql (3)
- View all 237 tags »
- Sql Server (3)
- Stored Procedure (3)
- visual sutdio (3)
- API (2)
- Data (2)
- Mango (2)
- Module (2)
- Permission (2)
- PhoneTextBlock (2)
- User Control (2)
- Windows (2)
- config (2)
- console (2)
- developer (2)
- dot net (2)
- emulator (2)
- enumeration (2)
- expression blend (2)
- extension (2)
- loop (2)
- network (2)
- phone 7 (2)
- tools (2)
- transparent (2)
- .ascx (1)
- 3g (1)
- 5.6.2 (1)
- 7.1 (1)
- 7.5 (1)
- AJAX (1)
- Activity (1)
- App.xaml (1)
- AppManifest (1)
- ApplicationIcon (1)
- Arabic (1)
- Background.png (1)
- BuildAction (1)
- Connector (1)
- Control Panel (1)
- Core Version (1)
- Data-tier (1)
- DataBound (1)
- Database (1)
- Dependency (1)
- DeviceNetworkInterface (1)
- Directory (1)
- Dynamic (1)
- EVDO (1)
- Encryption (1)
- File (1)
- FileSystemWatcher (1)
- Filter (1)
- Foreign Key (1)
- Function (1)
- GUID (1)
- GetSiteLog (1)
- Hash (1)
- Host Settings (1)
- IIS6 (1)
- IIS7 (1)
- Integrated Mode (1)
- Internet Explorer (1)
- IsolatedStorage (1)
- Java (1)
- Koder (1)
- Linq (1)
- Lists (1)
- Log (1)
- Marketplace (1)
- Membership (1)
- Microsoft (1)
- NavigationCacheMode (1)
- NavigationContext (1)
- NavigationService (1)
- Notify (1)
- OnClientNodeChecked (1)
- PTCL (1)
- Panaroma (1)
- Password (1)
- Properties (1)
- Query String (1)
- ResXResourceReader (1)
- ResolveHostNameAsync (1)
- Right to Left (1)
- SDK (1)
- SEO (1)
- SendKeys (1)
- SendWait (1)
- SharpPCap (1)
- Stream (1)
