mirror of
https://github.com/qmlnet/qmlnet.git
synced 2026-05-15 14:15:54 -06:00
[GH-ISSUE #80] Hide console/terminal #51
Labels
No labels
bug
enhancement
help wanted
help wanted
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/qmlnet#51
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @codec-abc on GitHub (Nov 11, 2018).
Original GitHub issue: https://github.com/qmlnet/qmlnet/issues/80
Hi,
This is again a newbie question:
All tests I did on Windows had a console window that was around since the .Net Core project was a console one. While useful for debugging and such, this isn't something I want for release. Is there a way to not show (or hide) the terminal window?
@pauldotknopf commented on GitHub (Nov 11, 2018):
On Windows, there two ways to compile an app. You can compile as a "Windows Application" or a "Console Application".
GUI apps (WinForms, WPF) are typically compiled as a "Windows Application".
.NET Core currently doesn't support a way to compile in any other way than "Console Application", but there is a post-build step to achieve the same effect (since it's just a flag in the compiled exec).
Run this on your deployed app.
See here for more info.
Since .NET Core 3.0 will support WinForms and WPF, it will have the option of compiling as a "Windows Application", but until then, we need this post-build step.
@codec-abc commented on GitHub (Nov 12, 2018):
Thanks for the answer. By curiosity, how the program behave on Linux/Mac?
@pauldotknopf commented on GitHub (Nov 12, 2018):
The binaries behave as you'd expect on Linux/Mac. It is only Windows that has this concept of "Windows application" vs "Console application".
@vadi2 commented on GitHub (Jun 26, 2019):
As of .NET Core 3.0, you can set
<OutputType>WinExe</OutputType>in your csproj or pass/p:OutputType=WinExeas an argument todotnet publishto avoid the console window.