The reason you're getting that error is because you're trying to update a UI element from a non-UI thread. You can call the control's Invoke method to force it to run on the UI thread.
public void OnMessage(IMessage message)
{
ITextMessage msg = (ITextMessage)message;
message.Acknowledge();
if (txtConsole.InvokeRequired)
{
txtConsole.Invoke(new Action(() =>
{
txtConsole.AppendText(Environment.NewLine + msg.Text);
}));
}
else
{
txtConsole.AppendText(Environment.NewLine + msg.Text);
}
}