为什么在项目上调用 MSBuild 后 NAnt 不生成引导程序文件?
我的 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 下生成此引导程序文件?
I have a project with this in its MSBuild script:
<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>
If I run the project in visual studio, that gets run after the build and a setup.exe bootstrapper file is created in my bin/debug directory. However, if I build that same project (a WiX project, if that matters) under NAnt, everything gets built in the output directory that NAnt specifies, except the bootstrapper file. Nothing is being built in the project's bin/debug directory when I build it under NAnt, so the setup.exe file doesn't seem to be getting built, even there. I don't think that the AfterBuild step is even being run.
How can I generate this bootstrapper file under NAnt?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我必须在 NAnt 脚本中指定变量 OutputPath:
I had to specify the variable OutputPath in my NAnt script: