zoukankan      html  css  js  c++  java
  • DNN打包

          当DNN模块开发接近尾声的时候,我们就该考虑怎么打包模块了。
          要打包模块,关键在于后缀DNN文件的编写。其实写起来也很简单,下面大家看一下。
    <dotnetnuke version="3.0" type="Module">
      <folders>
        <folder>
          <name>YourCompany.Demo</name>
          <friendlyname>Demo</friendlyname>
          <foldername>Demo</foldername>
          <modulename>YourCompany.Demo</modulename>
          <description>A Demo module</description>
          <version>01.00.00</version>
          <businesscontrollerclass>YourCompany.Modules.Demo.DemoController</businesscontrollerclass>
          <modules>
            <module>
              <friendlyname>Demo</friendlyname>
              <cachetime>60</cachetime>
              <controls>
                <control>
                  <src>DesktopModules/Demo/ViewDemo.ascx</src>
                  <type>View</type>
                  <helpurl></helpurl>
                </control>
                <control>
                  <key>Edit</key>
                  <title>Edit Content</title>
                  <src>DesktopModules/Demo/EditDemo.ascx</src>
                  <type>Edit</type>
                  <helpurl></helpurl>
                </control>
                <control>
                  <key>Settings</key>
                  <title>Demo Settings</title>
                  <src>DesktopModules/Demo/Settings.ascx</src>
                  <type>Edit</type>
                  <helpurl></helpurl>
                </control>
              </controls>
            </module>
          </modules>
          <files>
            <file>
              <name>ViewDemo.ascx</name>
            </file>
            <file>
              <name>ViewDemo.ascx.cs</name>
            </file>
            <file>
              <name>EditDemo.ascx</name>
            </file>
            <file>
              <name>EditDemo.ascx.cs</name>
            </file>
            <file>
              <name>Settings.ascx</name>
            </file>
            <file>
              <name>Settings.ascx.cs</name>
            </file>
            <file>
              <path>App_LocalResources</path>
              <name>ViewDemo.ascx.resx</name>
            </file>
            <file>
              <path>App_LocalResources</path>
              <name>EditDemo.ascx.resx</name>
            </file>
            <file>
              <path>App_LocalResources</path>
              <name>Settings.ascx.resx</name>
            </file>
            <file>
              <path>[app_code]</path>
              <name>DataProvider.cs</name>
            </file>
            <file>
              <path>[app_code]</path>
              <name>DemoController.cs</name>
            </file>
            <file>
              <path>[app_code]</path>
              <name>DemoInfo.cs</name>
            </file>
            <file>
              <path>[app_code]</path>
              <name>SqlDataProvider.cs</name>
            </file>
            <file>
              <name>01.00.00.SqlDataProvider</name>
            </file>
            <file>
              <name>Uninstall.SqlDataProvider</name>
            </file>
          </files>
        </folder>
      </folders>
    </dotnetnuke>
          就我看来,要注意三点:
          首先,foldername要与模块名称一致,即与DesktopModules、App code 下的模块文件夹名一致。不然,打包的时候,系统无法找到要压缩的文件。
          其次,files元素里的文件要列全,不然少了就不好了。
          最后,我打包的时候,前两步都做好了。但是列出的dll文件就是导不出来(我的是4.5.5的,当前最新版本,呵呵,还是有不足),怎么办,其实我也不知道。不过,我们可以双击系统刚生成的ZIP文件,再添加上系统忘记添加的dll就可以了。这样手工一点,照样可以做出我们想要的安装文件。
          在从DNN模板你建一个web试试,好,安装刚做好的模块。结果,我刚刚开发的DNN模块导入成功。YE

  • 相关阅读:
    java面向对象类的继承~ 匿名类 ;多态特性;强制类型转换
    Java面向对象~类和对象&方法,类方法
    1036. Escape a Large Maze
    909. Snakes and Ladders
    559. Maximum Depth of N-ary Tree
    987. Vertical Order Traversal of a Binary Tree
    913. Cat and Mouse
    865. Smallest Subtree with all the Deepest Nodes
    882. Reachable Nodes In Subdivided Graph
    864. Shortest Path to Get All Keys
  • 原文地址:https://www.cnblogs.com/denglinhai/p/855769.html
Copyright © 2011-2022 走看看