This project is read-only.

Console Class - Task ReadLine

Sep 22, 2009 at 4:01 PM

Hey There

Someone already use the Console Class? especially the ReadLine Task?

How it work? I tried to use, but i wasn'd able to do this. does not appers any console window, to the user type something.

It only log in the BuildLog.txt something like that:

Task "MSBuild.ExtensionPack.UI.Console"
     Please enter a response and press [Enter]:
Done executing task "MSBuild.ExtensionPack.UI.Console"

Is it necessary to configure something to allow the windows to be showed??

Sep 22, 2009 at 4:50 PM


Can you post a sample / describe what you are trying to do. The readline task gets input from a user and adds it to a property which  can be used later.


Sep 22, 2009 at 9:37 PM

Yes, this is exactaly what i'm trying to do.

I want to take a input from the user, i dont mind that the user must be phisicaly in the server.

I have two distincts situations:

1- When i run the build in the service mode (port 9191) nothing happens, in the buildlog.txt is logged the messages above

2- When i run the build in the intective mode (port 9192) the build progress frozen in the target that i put the ReadLine task, i cant do nothing to continue the build process, i tried to type something, press enter...

Whats the correct way to perform this kind of operations?

Sep 23, 2009 at 7:49 AM

Ah, sounds like you are using this in a TFS team build. 9191 will definitely not work. I'm not sure if 9192 will, doesn't look like it given what you are experiencing. I'll try find out if there is a way to get it to work. You may be better off passing in a build parameter or reading a value from somewhere else, like an environment variable.