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
2
votes
0 answers

Windows service does not start WPF application

I have an ASP.Net Core application that runs as Windows Service. Its task is to check files on the FTP server when the condition is met is to launch the WPF application. The application works properly during tests in the debugger. When it is started…
Deivid.PL
  • 31
  • 6
2
votes
1 answer

Calculate system CPU usage for console application running on IoT Core

I am referring below link to calculate cpu usage on win iot core- Calculate CPU Usage in Percentage UWP Application Windows 10 IOT But it require Windows.System.Diagnostics to access for below code snippet to get info for running process- var…
2
votes
2 answers

How to get all console error messages in Angular application

I'm working on a angular application, the problem is when I want to debug it on some smart TVs there is no debug mode and in the background I have some errors that cause application to crash, so, is there any way to get all error messages and print…
Masoud Motallebipour
  • 414
  • 3
  • 16
  • 33
2
votes
1 answer

Inserting value from API to database

I created a ConsoleApplication that gets information from an API and then is supposed to put one of the values in a table from the database. Everything works fine (like getting the values and filling the object data with them) but I can't seem to…
Questieme
  • 913
  • 2
  • 15
  • 34
2
votes
3 answers

User Option Yes/No

I need to show some message to user when a file exist, that display the message "the files exist... do you want to overwrite it??" if (File.Exists(binaryFilePath)) { Program.DisplayMessage("The file: " + binaryFileName + " exist. You want to…
ale
  • 3,301
  • 10
  • 40
  • 48
2
votes
0 answers

Generating a GS1-Databar (formerly RSS_14) barcode using ZXing

The below snippet gives error No encoder available for format RSS_14 I have referred this link for generating the barcode in GS1-Databar. I found that the ZXing.Net doesn't support encoding in GS1-Databar. Please provide the custom way to…
2
votes
4 answers

LINQ prints out sytax instead of result

Practicing LINQ and have run into a newbie error. static void Main(string[] args) { List Customers = new List(); Customers.Add("Faizan"); Customers.Add("Ali"); Customers.Add("Fazeel"); Customers.Add("Salim"); …
Ahmed Faizan
  • 446
  • 5
  • 12
  • 22
2
votes
2 answers

How does one use dependency injection outside of an MVC context?

Core issue Every example I see for dependency injection is paired with MVC for some reason as if nothing else exists outside of web projects. I take issue with this because there is a contradiction going on with MVC utilizing dependency injection…
2
votes
2 answers

PostAsync() method is not working in dot-net core window service

I am trying the run the console application as a window service in dot-net core and able to create ,start ,stop and delete the service. I am using PostAsync() method in application but the issue is that this method is working perfectly in console…
2
votes
1 answer

Strange behaviour from Console.ReadKey()

The output looks something like: ] [ Your input is: ffffffwwqqqwffasfffffffw > when you use BACKSPACE which shouldn't be possible to begin with, why is this happening using System; using System.Collections.Generic; using…
2
votes
0 answers

Why Nuget package need to be added in the dependent project for execution?

Created 3 projects in a solution. A. Class library targeting .NET Standard Library Retrieving a database value using System.Data.SqlClient which is added via NuGet B. .NET Core console application : Referencing project A to display the DB…
Anto Varghese
  • 3,131
  • 6
  • 31
  • 38
2
votes
2 answers

What is the equivalent of IApplicationBuilder(asp.net core) in GenericHost application?

I have this piece of code working in asp.net core application, now I want to use eventBus in genericHost based application. So, what is the equivalent code? public static void Configure(IApplicationBuilder app, IHostingEnvironment env,…
2
votes
7 answers

How call the main method or restart the app console?

When an exception occurs I want to restart all the processing or start the Main method, after this other method: public void DisplayMessage(string message) { Console.WriteLine(message, "Rebuild Log Files"); Console.WriteLine(" Press Enter…
ale
  • 3,301
  • 10
  • 40
  • 48
2
votes
2 answers

.Net Core Identity SignInManager in Console App w/o DI/WebHost

I'm attempting to write a generic .Net Core 2.2 Console Application that allows me to use Identity. Specifically I have a database and am simply tring to call SignInManager.PasswordSignInAsync() to authenticate the username/password against my…
WebDrive
  • 1,248
  • 12
  • 19
2
votes
0 answers

Wrong arrangement of pawns on a console board

I would like to create the game Stratego in an F# console application. The current display (see figure 1) does not show any wrong position of pawns, however they seem to be positioned differently (see figure 2, after some moves). The program detects…
Foxy
  • 980
  • 8
  • 17