I have a console Application and I need to occasionally launch a WPF form depending on the parameters. I and trying the following:

```
if (arg == "/C")
{
    System.Windows.Application application = new System.Windows.Application();
    application.Run(new EJConfig.MainWindow());
}

```

The problem is that when I go to add a reference to System.Windows, it doesn't show up in the list of .NET components, and without it I get the following error:

```
The type or namespace name 'Windows' does not exist in the namespace 'System' (are you missing an assembly reference?)

```