Displays a message on the console and waits for user input.
Namespace: MSBuild.Community.Tasks
Assembly: MSBuild.Community.Tasks (in MSBuild.Community.Tasks.dll)
Syntax
Example
Pause the build if the interactive property is set:
Copy Code | |
---|---|
<!-- Pause when invoked with the interactive property: msbuild myproject.proj /property:interactive=true --> <Prompt Text="You can now attach the debugger to the msbuild.exe process..." Condition="'$(Interactive)' == 'True'" /> |
Copy Code | |
---|---|
<Prompt Text="Tell me your name:" Condition="'$(Interactive)' == 'True'" > <Output TaskParameter="UserInput" PropertyName="PersonName" /> </Prompt> <Message Text="Hello $(PersonName)" /> |
Remarks
It is important to note that the message is not written to the MSBuild logger, it is always written to the console, no matter which logger is configured.
This task requires user input from the console. Do not use this task for projects that will be executed unattended. It is recommended that you always add a Condtion so that this task is only enabled when a custom property is set through the command line. This will ensure that the other users do not attempt to execute the task in unattended mode.
Inheritance Hierarchy
Thread Safety
Public static (Shared in Visual Basic)staticShared members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
See Also
Documentation version 1.0.0.0.