user5447154
user5447154

Reputation:

Launch console application from WPF application in debug and release modes

Using a WPF application, all console output goes to the Visual Studio output window if you use debug mode or in release mode, no Console appears. Is it an anomaly? If you know a workaround? I want my console appears in two modes.. thank you in advance.

public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Program.Main();
        }
    }

Upvotes: 0

Views: 525

Answers (1)

nicolas2008
nicolas2008

Reputation: 1052

Just change project "Output type" to "Console Application" and you will see both: app window and console.

enter image description here

Upvotes: 1

Related Questions