How can I pause in the middle of the execution of a MSBuild script?
I tried to use:
<Exec Command="pause" />
But that 开发者_运维技巧doesn't work. Please help to to pause!
Nam.
I've tried Prompt task with an sample script as below. It works. Thank you! Nam.
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="MAIN" >
<Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets" />
<Target Name="MAIN">
<MSBuild.Community.Tasks.Prompt Text="Press any key..." >
<Output TaskParameter="UserInput" PropertyName="out" />
</MSBuild.Community.Tasks.Prompt>
</Target>
</Project>
The MSBuild Community Tasks has a Prompt task that sounds like it will work for you. I've never used it myself, so can't say from experience.
精彩评论