Console ClassMSBuild Extension Pack Help
Valid TaskActions are:

Beep (Optional: Title, Repeat, Duration, Frequency, Interval)

ReadLine (Optional: Title, UserPrompt, ToLower, ToUpper Output: UserResponse)

Remote Execution Support: No

Inheritance Hierarchy


Namespace: MSBuild.ExtensionPack.UI
Assembly: MSBuild.ExtensionPack (in MSBuild.ExtensionPack.dll) Version:

The Console type exposes the following members.


Public methodConsole

Public propertyDuration
Sets the duration. Default is 333ms. Value must be between 1 and 10000
Public propertyFrequency
Sets the frequency. Default is 600hz. Value must be between 37 and 32767
Public propertyInterval
Sets the interval between beebs. Default is 10ms. Value must be between 10 and 5000
Public propertyRepeat
Sets the repeat. Default is 1. Value must be between 1 and 20
Public propertyTitle
Set the title of the console
Public propertyToLower
Sets the UserResponse to lower text
Public propertyToUpper
Sets the UserResponse to uppper text
Public propertyUserPrompt
The message to prompt the user for input. Default is "Please enter a response and press [Enter]:"
Public propertyUserResponse
Gets the response that the user typed

<Project ToolsVersion="4.0" DefaultTargets="Default" xmlns="">
        <TPath Condition="Exists('$(MSBuildProjectDirectory)\..\..\Common\MSBuild.ExtensionPack.tasks')">$(MSBuildProjectDirectory)\..\..\Common\MSBuild.ExtensionPack.tasks</TPath>
    <Import Project="$(TPath)"/>
    <Target Name="Default">
        <!-- Read input from the user -->
        <MSBuild.ExtensionPack.UI.Console TaskAction="ReadLine">
            <Output TaskParameter="UserResponse" PropertyName="Line"/>
        <Message Text="User Typed: $(Line)"/>
         <!-- Read input from the user and uppercase it all -->
        <MSBuild.ExtensionPack.UI.Console TaskAction="ReadLine" UserPrompt="Please enter your password and press the [Enter] key" ToUpper="true">
            <Output TaskParameter="UserResponse" PropertyName="Line"/>
        <Message Text="User Typed: $(Line)"/>
        <!-- Play some beeps -->
        <MSBuild.ExtensionPack.UI.Console TaskAction="Beep" Repeat="3"/>
        <MSBuild.ExtensionPack.UI.Console TaskAction="Beep" Repeat="4" Duration="500" Frequency="1000"/>
        <MSBuild.ExtensionPack.UI.Console TaskAction="Beep" Repeat="3" Interval="2000"/>
See Also