4
如何使用msbuild获取exec任务输出
我正在尝试通过exec任务获取简单的输出msbuild: <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Target Name="Test"> <Exec Command="echo test output"> <Output TaskParameter="Outputs" ItemName="Test1" /> </Exec> <Exec Command="echo test output"> <Output TaskParameter="Outputs" PropertyName="Test2" /> </Exec> <Message Text="----------------------------------------"/> <Message Text="@(Test1)"/> <Message Text="----------------------------------------"/> <Message Text="$(Test2)"/> <Message Text="----------------------------------------"/> </Target> </Project> 但是得到下一个输出: echo test output test output echo test output test output ---------------------------------------- ---------------------------------------- ---------------------------------------- 如何通过脚本获取输出?