Tag: msbuild target

MSBuild传递参数给CallTarget

我试图在我的MSBuild文件中创build一个可重用的目标,所以我可以用不同的参数多次调用它。 我有这样的骨架: <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> 但我不能解决如何让parameter passing到CallTarget ,然后转而Target本身。