样品请求:nant-contrib 的任务

发布于 2024-07-11 16:49:52 字数 64 浏览 9 评论 0原文

谁能给我提供一个示例构建文件,演示如何使用 nant-contrib 任务来创建 Web 应用程序项目的安装程序。

Can anyone please provide me a sample build file demostrating the use of the task of nant-contrib for creating an installer of a web application project.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

缘字诀 2024-07-18 16:49:52

这个 :)

<?xml version="1.0"?> 
<project name="Scanner" xmlns="http://nant.sf.net/release/0.85/nant.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://nant.sf.net/release/0.85/nant.xsd http://ilqhfaatc1ws628/nant.xsd"> 


<!-- Nant command line: 
c:\nant\nant   -debug+ /f:"D:\LaptopServiceTools\ShortFilenameFailure.build.xml" -v+ create.msi 
--> 
<target name="create.msi"> 

<setenv> 
  <!--Set path to CabArc.exe.--> 
  <variable name="PATH" path="c:\Program Files\Microsoft Visual Studio 8\Common7\Tools\Bin\;%PATH%" /> 
</setenv> 

<msi sourcedir="c:\" output="c:\test.msi"> 
  <properties> 
    <property name="ProductName" value="nAntTest" /> 
    <property name="ProductVersion" value="2.5.1.0002" /> 
    <property name="Manufacturer" value="Test" /> 
    <property name="ProductCode" value="{F86BC501-47EB-4A14-BB01-2CC2CB8D1232}"/> 
    <property name="UpgradeCode" value="{B095E2D1-B9D1-412B-8B1D-A914E8876DD5}"/> 
    <property name="TARGETDIR" value="c:\"/> 

  </properties> 

  <directories> 
      <directory name="USR" foldername="usr12" root="TARGETDIR"> 
        <directory name="DIAMONDROOT" foldername="diamond.root"> 
          <directory name="BIN" foldername="bin"/> 
          <directory name="CCFG" foldername="comcal_cfg"/> 
          <directory name="CFG" foldername="cfg"> 
            <directory name ="APPDEFAULTS" foldername="app-defaults"/> 
          </directory> 
        </directory> 
        <directory name="SERVICEROOT" foldername="service.root"> 
          <directory name="RELI" foldername="reli"/> 
        </directory> 
        <directory name="DIAMONDDATA" foldername="diamond.data"> 
          <directory name="PHYSICSLOG" foldername="Physics_log"/> 
        </directory> 
      </directory> 
    </directories> 

  <components> 
    <component name="DiamondRootBinFiles" id="{9904C798-B9F7-450D-902A-1C92D7008014}" attr="2" directory="BIN" feature="FilesFeature" keepsubdirs="true"> 
      <key file="cmd.exe"/> 
      <fileset basedir="c:\Windows\system32"> 
        <include name="cmd.exe" /> 
      </fileset> 
    </component> 
  </components> 

  <features> 
    <feature name="FilesFeature" title="Scanner" display="1" typical="true" directory="C__DRIVE"> 
      <description>Log viewer support files Files</description> 
    </feature> 
  </features> 
</msi> 
</target> 
</project>

This one :)

<?xml version="1.0"?> 
<project name="Scanner" xmlns="http://nant.sf.net/release/0.85/nant.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://nant.sf.net/release/0.85/nant.xsd http://ilqhfaatc1ws628/nant.xsd"> 


<!-- Nant command line: 
c:\nant\nant   -debug+ /f:"D:\LaptopServiceTools\ShortFilenameFailure.build.xml" -v+ create.msi 
--> 
<target name="create.msi"> 

<setenv> 
  <!--Set path to CabArc.exe.--> 
  <variable name="PATH" path="c:\Program Files\Microsoft Visual Studio 8\Common7\Tools\Bin\;%PATH%" /> 
</setenv> 

<msi sourcedir="c:\" output="c:\test.msi"> 
  <properties> 
    <property name="ProductName" value="nAntTest" /> 
    <property name="ProductVersion" value="2.5.1.0002" /> 
    <property name="Manufacturer" value="Test" /> 
    <property name="ProductCode" value="{F86BC501-47EB-4A14-BB01-2CC2CB8D1232}"/> 
    <property name="UpgradeCode" value="{B095E2D1-B9D1-412B-8B1D-A914E8876DD5}"/> 
    <property name="TARGETDIR" value="c:\"/> 

  </properties> 

  <directories> 
      <directory name="USR" foldername="usr12" root="TARGETDIR"> 
        <directory name="DIAMONDROOT" foldername="diamond.root"> 
          <directory name="BIN" foldername="bin"/> 
          <directory name="CCFG" foldername="comcal_cfg"/> 
          <directory name="CFG" foldername="cfg"> 
            <directory name ="APPDEFAULTS" foldername="app-defaults"/> 
          </directory> 
        </directory> 
        <directory name="SERVICEROOT" foldername="service.root"> 
          <directory name="RELI" foldername="reli"/> 
        </directory> 
        <directory name="DIAMONDDATA" foldername="diamond.data"> 
          <directory name="PHYSICSLOG" foldername="Physics_log"/> 
        </directory> 
      </directory> 
    </directories> 

  <components> 
    <component name="DiamondRootBinFiles" id="{9904C798-B9F7-450D-902A-1C92D7008014}" attr="2" directory="BIN" feature="FilesFeature" keepsubdirs="true"> 
      <key file="cmd.exe"/> 
      <fileset basedir="c:\Windows\system32"> 
        <include name="cmd.exe" /> 
      </fileset> 
    </component> 
  </components> 

  <features> 
    <feature name="FilesFeature" title="Scanner" display="1" typical="true" directory="C__DRIVE"> 
      <description>Log viewer support files Files</description> 
    </feature> 
  </features> 
</msi> 
</target> 
</project>
花桑 2024-07-18 16:49:52

我一直在使用 Visual Studio 安装项目为 Web 应用程序创建 MSI,它快速、简单。

为什么不尝试一下呢?

I have been using Visual Studio Setup projects for creating MSI for Web Apps and it was quick good and easy.

Why not giving it a try?

揽清风入怀 2024-07-18 16:49:52

您可能忘记将 NAntContrib bin 文件放入 NAnt bin 文件夹中。

You may have forgotten to put your NAntContrib bin files into the NAnt bin folder.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文