【发布时间】:2010-12-02 21:51:39
【问题描述】:
我正在尝试在我的 MSBuild 文件中创建一个可重用的目标,以便我可以使用不同的参数多次调用它。
我有这样的骨架:
<Target Name="Deploy">
<!-- Deploy to a different location depending on parameters -->
</Target>
<Target Name="DoDeployments">
<CallTarget Targets="Deploy">
<!-- Somehow indicate I want to deploy to dev -->
</CallTarget>
<CallTarget Targets="Deploy">
<!-- Somehow indicate I want to deploy to testing -->
</CallTarget>
</Target>
但我不知道如何允许将参数传递给CallTarget,然后依次传递给Target 本身。
【问题讨论】:
标签: msbuild parameter-passing msbuild-target