How can I pause in the middle of the execution of a MSBuild script?

自古美人都是妖i 提交于 2019-12-23 16:16:26

问题


I tried to use:

<Exec Command="pause" />

But that doesn't work. Please help to to pause!

Nam.


回答1:


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.




回答2:


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>


来源:https://stackoverflow.com/questions/2542672/how-can-i-pause-in-the-middle-of-the-execution-of-a-msbuild-script

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!