views:

60

answers:

2

Dear ladies and sirs.

My console .NET application has several app domains. My wish is simple - console window per app domain.

Motivation:

The application is actually an MbUnit test assembly and the various app domains are the server hosts all packed in one process, though in different app domains to decrease execution time. Each server outputs to console, so when the console is shared with MbUnit test assembly one gets a salad. I wish to grant dedicated console window for each server app domain.

We use log4net for logging, so we can log to files and view files later, but at this stage it is much more convenient to log to console.

Thanks.

EDIT

I have solved my particular problem using TelnetAppender. I derived from it and from within ActivateOptions open a telnet client. To the user it looks like there are several console log windows.

A: 

You can only have (technically) a single console per Application (not AppDomain).

That being said, it is technically possible to simulate this behavior. It requires spawning a separate child application, and using Pipes to push the console output for each separate "console" to its own child application. Here is a CodeProject article demonstrating this approach (in C++).

Reed Copsey
A: 

Looks like a duplicate of this: http://stackoverflow.com/questions/671163/can-you-have-multiple-net-consoles-as-in-console-writeline

Vitaly
Indeed it is. Missed that one.
mark