Questions tagged [console-application]

A console application is a computer program designed to be used via a text-only computer interface, such as a text terminal, the command line interface of some operating systems (Unix, DOS, etc.) or the text-based interface included with most Graphical User Interface (GUI) operating systems, such as the Win32 console in Microsoft Windows, the Terminal in Mac OS X, and xterm in Unix.

A console application is a computer program designed to be used via a text-only computer interface, such as a text terminal, the command line interface of some operating systems (Unix, DOS, etc.) or the text-based interface included with most Graphical User Interface (GUI) operating systems, such as the Win32 console in Microsoft Windows, the Terminal in Mac OS X, and xterm in Unix. A user typically interacts with a console application using only a keyboard and display screen, as opposed to GUI applications, which normally require the use of a mouse or other pointing device. Many console applications such as command line interpreters are command line tools, but numerous text-based user interface (TUI) programs also exist.

As the speed and ease-of-use of GUI applications have improved over time, the use of console applications has greatly diminished, but not disappeared. Some users simply prefer console based applications, while some organizations still rely on existing console applications to handle key data processing tasks.

7241 questions
14
votes
1 answer

SetBasePath not present in ConfigurationBuilder under .NET Core 5

According to the docs for .NET Core 5, there's a method SetBasePath and it's widely used in a bunch of blogs (example 1, example 2, example 3 etc.). There's no notion of it being a weird gotcha or such. However, when I try the syntax below, it's…
Konrad Viltersten
  • 36,151
  • 76
  • 250
  • 438
14
votes
6 answers

run console application in C# with parameters

How can I run a console application in C#, passing parameters to it, and get the result of the application in Unicode? Console.WriteLine is used in the console application. Important point is write Unicode in Console Application.
Sajad Bahmani
  • 17,325
  • 27
  • 86
  • 108
14
votes
2 answers

Why does Console.Readline() have a limit on the length of text it allows?

Possible Duplicate: Console.Readline() max length? In my attempt to find a very simple text to speech application I decided it was faster to write my own. I noticed, however, that Console.Readline() is limited in the amount of text it allows per…
badp
  • 11,409
  • 3
  • 61
  • 89
14
votes
2 answers

VS 2017 .Net Core 2.0 Console Application Publish Fail

I've been trying to publish a .Net Core 2.0 Console Application using Visual Studio 2017 Community Edition but it always fails (it runs perfectly inside VS2017). This is my CSPROJ:
14
votes
3 answers

Set C# console application to Unicode output

I have a C# console application, and I was trying to do some ASCII art within it. However, some of the characters I wanted to use are Unicode. So, I was searching the internet/SO and couldn't find a consolidated answer on how to set the console to…
Michael Yanni
  • 1,476
  • 4
  • 17
  • 29
14
votes
4 answers

Running CLion on the System console (like Visual Studio)

I am trying to run a simple C++ program on CLion. The problem is that when I try to compile and run it, it shows the result in the application console. I want to run on the System console like the Visual Studio runs the output of the console apps.…
StefanL19
  • 1,476
  • 2
  • 14
  • 29
14
votes
2 answers

Server-side rendering of WPF UserControl

I am writing a server side console app in C#/.Net 4.5 that gets some data and creates static chart images that are saved to be displayed by a web server. I am mostly using the method described…
Rune Jacobsen
  • 9,907
  • 11
  • 58
  • 75
14
votes
3 answers

How to cancel Task await after a timeout period

I am using this method to instantiate a web browser programmatically, navigate to a url and return a result when the document has completed. How would I be able to stop the Task and have GetFinalUrl() return null if the document takes more than 5…
14
votes
2 answers

Checking if any key pressed in console application C#

I need to check if any key is pressed in a console application. The key can be any key in the keyboard. Something like: if(keypressed) { //Cleanup the resources used } I had come up with this: ConsoleKeyInfo…
user1502952
  • 1,390
  • 4
  • 13
  • 27
13
votes
4 answers

Symfony 2 Logging exceptions in console

Why errors from console tasks are not logged. For example Exception on php warning: [ErrorException] Notice: Undefined offset: 1 in /var/www/project/vendor/doctrine/lib/Doctrine/ORM/Query.php line 298 I see what printed in stdout, but nothing…
Sawered
  • 152
  • 1
  • 2
  • 10
13
votes
3 answers

how to handle spaces in file path if the folder contains the space?

public static void launchProcess(string processName, string arguments, out string output) { Process p = new Process { StartInfo = { UseShellExecute = false, RedirectStandardOutput = true, FileName = processName, Arguments = arguments…
vakas
  • 1,799
  • 5
  • 23
  • 40
13
votes
10 answers

How restart the Console app?

I need to restart the app Console when the user press "R". I have this Console.WriteLine(message, "Rebuild Log Files" + " Press Enter to finish, or R to restar the program..."); string restar = Console.ReadLine(); if(restar.ToUpper() == "R") { …
ale
  • 3,301
  • 10
  • 40
  • 48
13
votes
4 answers

Can I force a firefox page refresh from linux console

This is the Linux version of this question. Does anyone have a method for forcing a page refresh on firefox from the command-line?
Ken
  • 77,016
  • 30
  • 84
  • 101
13
votes
1 answer

How to allow migration for a console application?

When using asp.net core and ef core, I have no problem when invoking add-migration init. But when I apply the same approach on a console application below, I got an error saying: Unable to create an object of type 'StudentContext'. Add an…
Second Person Shooter
  • 14,188
  • 21
  • 90
  • 165
13
votes
1 answer

Visual Studio 2015 "stealing" the application's console

I'm developing a gcc application using Visual Studio 2015 as an IDE. The debugger is gdb. The application creates it's own window. When I compile with a DEBUG switch, I need the application to also spawn a console window. It's used for debugging and…