1

我在它的 MSBuild 脚本中有一个项目:

  <Target Name="AfterBuild">
    <GenerateBootstrapper ApplicationFile="MyApp.msi" ApplicationName="My App" BootstrapperItems="@(BootstrapperFile)" OutputPath="$(OutputPath)" Culture="en-US" CopyComponents="true" ComponentsLocation="HomeSite" Path="C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper" />
  </Target>

如果我在 Visual Studio 中运行该项目,它会在构建之后运行,并且在我的 bin/debug 目录中创建一个 setup.exe 引导程序文件。但是,如果我在 NAnt 下构建同一个项目(一个 WiX 项目,如果这很重要),那么除了引导程序文件之外,所有内容都会构建在 NAnt 指定的输出目录中。当我在 NAnt 下构建项目时,项目的 bin/debug 目录中没有构建任何内容,因此 setup.exe 文件似乎没有构建,即使在那里。我认为 AfterBuild 步骤甚至没有运行。

如何在 NAnt 下生成此引导程序文件?

4

1 回答 1

0

我必须在我的 NAnt 脚本中指定变量 OutputPath:

于 2011-03-24T16:40:04.947 回答