在所有DNN模块的安装包中,都有一个*.DNN文件。这个文件就是DNN模块的安装文件清单。在安装模块时DNN应用程序读取该文件,按照文件清单中的内容安装相关文件和数据库脚本。
DNN文件是一个XML文件结构大致如下:
<!--dotnetnuke节点,说明改文件时模块安装清单,使用与3.0.X版的DNN程序-->
<dotnetnuke version="3.0" type="Module">
<folders>
<folder>
<!--模块名称-->
<name>CLinks</name>
<!--模块名称(模块的友好名称)-->
<friendlyname>CLinks</friendlyname>
<!--模块功能描述-->
<description>分类链接模块</description>
<!--模块版本-->
<version>01.00.00</version>
<!--业务逻辑类-->
<businesscontrollerclass>DNNChina.Modules.CLinks.CLinksController, DNNChina.Modules.CLinks</businesscontrollerclass>
<modules>
<module>
<friendlyname>CLinks</friendlyname>
<!--模块所包含的控件-->
<controls>
<!--显示控件-->
<control>
<src>DesktopModules/CLinks/CLinks.ascx</src>
<type>View</type>
</control>
<!--编辑控件-->
<control>
<key>Edit</key>
<title>Edit CLinks</title>
<src>DesktopModules/CLinks/EditCLinks.ascx</src>
<type>Edit</type>
</control>
<!--设置控件-->
<control>
<key>Settings</key>
<title>Settings CLinks</title>
<src>DesktopModules/CLinks/Settings.ascx</src>
<type>Edit</type>
</control>
</controls>
</module>
</modules>
<!--需要安装的文件清单-->
<files>
<!--程序集文件-->
<file>
<name>DNNChina.Modules.CLinks.dll</name>
</file>
<file>
<name>DNNChina.Modules.CLinks.SqlDataProvider.dll</name>
</file>
<!--用户控件文件-->
<file>
<name>CLinks.ascx</name>
</file>
<file>
<name>EditCLinks.ascx</name>
</file>
<file>
<name>Settings.ascx</name>
</file>
<!--语言包文件-->
<file>
<path>App_LocalResources</path>
<name>CLinks.ascx.resx</name>
</file>
<file>
<path>App_LocalResources</path>
<name>CLinks.ascx.zh-CN.resx</name>
</file>
<file>
<path>App_LocalResources</path>
<name>EditCLinks.ascx.resx</name>
</file>
<file>
<path>App_LocalResources</path>
<name>EditCLinks.ascx.zh-CN.resx</name>
</file>
<file>
<path>App_LocalResources</path>
<name>Settings.ascx.resx</name>
</file>
<file>
<path>App_LocalResources</path>
<name>Settings.ascx.zh-CN.resx</name>
</file>
<!--数据库安装脚本-->
<file>
<name>01.00.00.SqlDataProvider</name>
</file>
<!--数据库卸载脚本-->
<file>
<name>Uninstall.SqlDataProvider</name>
</file>
</files>
</folder>
</folders>
</dotnetnuke>
DNN文件是一个XML文件结构大致如下:
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
大家在开发模块时,可以照此结构编写自己需要的DNN安装文件。
相关内容:
模块的文件结构及命名方法:
http://www.cnblogs.com/esshs/archive/2005/07/21/197198.html
更多相关内容>>
==========================================
作者:二十四画生
转载请注明来源于博客园——二十四画生的Blog,并保留有原文链接。