console-application Questions
3
Does anyone know how to implement MediatR in a console application, to call a handler function using the _mediatr.Send(obj) syntax. I'm using the .Net 6 framework. Thanks for the help.
Microfilm asked 25/7, 2022 at 6:21
7
Solved
ok, I have an A level computing exam on Monday, and I have been working on the pre-release skeleton code.
This morning when I tried I got an error saying 'Sub Main' was not found. There clearly i...
Singlet asked 29/5, 2014 at 11:7
2
Solved
I encountered a simple problem when trying to test TPL. I would like to get numbers (from 1 to 1000) for example in the console window.
This is the code that I have:
class Program
{
static void Ma...
Remount asked 9/3, 2013 at 17:17
3
I'm just starting to learn how to code in Powershell. So, how can I do dis?
I searched the MS website but it is not clear...
Atiptoe asked 27/10, 2022 at 16:8
6
I am using .NET Core 3.1 and want to create a GRPC Service with a Console App as the Server and a WPF App as the Client.
I can't see any examples online - for some reason all the Console Apps seem ...
Constrained asked 29/9, 2020 at 16:1
2
Solved
rabbit connection from console app :
var factory = new ConnectionFactory()
{
HostName = Environment.GetEnvironmentVariable("RabbitMq/Host"),
UserName = Environment.GetEnvironmentVariable("Rabb...
Shod asked 20/1, 2018 at 21:38
12
Writing an infinite loop is simple:
while(true){
//add whatever break condition here
}
But this will trash the CPU performance. This execution thread will take as much as possible from CPU's po...
Exothermic asked 13/9, 2011 at 12:50
3
I have a console application with lots of WriteLine() functions, this application should also run as a "service" (a scheduled task, the user is not logged in when it runs).
In this case, there is ...
Pushing asked 20/9, 2015 at 10:2
9
Solved
How can you set a default input value in a .net console app?
Here is some make-believe code:
Console.Write("Enter weekly cost: ");
string input = Console.ReadLine("135"); // 135...
Dumfound asked 31/10, 2009 at 19:17
2
Solved
How to execute child console programs without showing the console window from the Win32 GUI program?
(I've searched SO answers and found no clear solution to this problem.)
I'm working on a MFC GUI program. This program runs various child programs including console program and shell command scrip...
Wuhsien asked 20/1, 2011 at 4:51
1
I'm creating a silly utility under XCode 10.2.1, with a swift + ncurses template.
The compilation environment seems amazingly easy to setup:
1.- You import some Darwin.ncurses at the beginning of ...
Anette asked 22/5, 2019 at 15:15
11
Solved
I need to write different paragraphs of text within a certain area. For instance, I have drawn a box to the console that looks like this:
/----------------------\
| |
| |
| |
| |
\----------------...
Usance asked 10/5, 2012 at 19:47
3
Solved
Hi I have below dockerfile for .NET 6 console app
FROM mcr.microsoft.com/dotnet/runtime:6.0 AS base
WORKDIR /app
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["MyProj/MyPro...
Samarium asked 30/3, 2023 at 11:55
3
Solved
First, to clarify, I am not asking how to drag-and-drop a file onto an exe's icon. I want to know how to handle drag and drop onto an already running win32 console application. I'm also not asking ...
Protrude asked 25/1, 2014 at 1:6
34
Solved
I have two projects, ProjectA and ProjectB. ProjectB is a console application, which depends on ProjectA. Yesterday, everything was working fine, but suddenly today when I run ProjectB I get this:
...
Lockyer asked 6/7, 2012 at 22:14
3
Solved
I'm trying to follow UWP with Desktop Extension – Part 2 of UWP and WinForms desktop-bridge calling the processes and passing parameters. This example Console Program.cs code includes parameters st...
Monadnock asked 4/7, 2019 at 2:28
2
Solved
We would like to get log for:
Console (all log)
File (all log)
File (only filtered log)
All of this configured in appsettings.json.
This is the appsettings.json file for the application:
{
"...
Carbohydrate asked 16/3, 2018 at 7:32
16
Solved
I'm studying C# by following the guides in MSDN.
Now, I just tried the Example 1 (here is the link to MSDN), and I've encountered an issue: why is the console window closing immediately once disp...
Decanal asked 15/1, 2012 at 8:6
8
Is there a way we can run individual .cs files in Visual Studio Code.
I have followed this link and runs fine but then I added Program2.cs and try to run using "dotnet run Program2.cs" but it fai...
Uremia asked 27/3, 2018 at 2:23
6
In .NET, is there a method, such as an event, for detecting when a console application is exiting? I need to clean up some threads and COM objects.
I am running a message loop, without a form, from...
Bonanno asked 13/7, 2009 at 14:38
9
Solved
I try to create a .NET 6 Console Application but having troubles reading my appsettings.json file. In a web application I could use this...
var builder = WebApplication.CreateBuilder(args);
But wh...
Hypoblast asked 21/4, 2022 at 12:11
5
Solved
I am trying to set the size of the Console Window in a c# console application. I get an ArgumentOutOfRangeException with this message:
The value must be less than the console's current maximum w...
Responsibility asked 26/2, 2013 at 21:23
4
Solved
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 ...
Eustacia asked 22/7, 2016 at 19:19
7
Solved
When running a console application in Visual Studio via "Start without Debugging" (Ctrl+F5), the console remains open at the end of the run asking to
Press any key to continue . . .
thus requi...
Adallard asked 27/7, 2013 at 12:18
2
Solved
I want to connect to REST Api, but it keeps returning status code 400 (Bad Request) no matter how I build the request.
HttpResponseMessage response = client.PostAsync(url, content).Result;
respons...
Yesman asked 7/7, 2020 at 12:17
1 Next >
© 2022 - 2024 — McMap. All rights reserved.