dotnet / dotnet/command-line-api

AllocConsole() prior to help being shown?

Open
#1,467 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
3.7k
Forks
428
PR merge metrics
No merged PRs in 30d

Description

I have a project that I want to keep as a WinExe. I only want to create a console if I know that the help is going to be shown.

Calling AllocConsole() prior to parsing my command line, then FreeConsole() after, is a workaround, but it causes the console to pop up briefly which is not ideal.

It would be helpful if I could determine if help will be shown before it's actually shown. I could call AllocConsole() at that point.

Any ideas?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.