Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
38 views

No exceptions or logging when missing dependency with IHostedService?

A colleague of mine is working on a console app, and we had a bit of a stumble. Launching the app would simply flash up an empty console window, which would then immediately close. No breakpoints ...
ConnieMnemonic's user avatar
0 votes
2 answers
66 views

Why "dotnet new console" generates a project that cannot be compiled with "dotnet build"? (error CS5001)

First, a little excerpt from Microsoft: Starting with .NET 6, the project template for new C# console apps generates the following code in the Program.cs file: // See https://aka.ms/new-console-...
antivaxxer's user avatar
-1 votes
0 answers
26 views

Is it possible to capture the Task scheduler Task details such as info and error details.?

I have a requirement of capturing and saving in DB of the Task Scheduler's Task details such as in case if Task fails to run, what was the reason that it failed? What errors occured.? I want this ...
Sherlock's user avatar
  • 564
0 votes
0 answers
48 views

Setting app config as a string variable instead of a config file

For my console app I have stored app.config in custom path for now AppDomain.CurrentDomain.SetData("APP_CONFIG_FILE", "c:\path to config file"); ConfigurationManager.RefreshSection(...
Nitin S's user avatar
  • 7,499
-1 votes
0 answers
28 views

VS Code launch.json file doesn't allow 'args' property for launch request configuration of a dotnet console application

I have created a console application in VS Code using the below dotnet command. My VS Code version is - When I configured the launch.json file by adding a launch configuration for this console ...
Sunny Mittal's user avatar
-1 votes
0 answers
33 views

AOP Custom Attributes in C# ConsoleApp without PostSharp

Here is my question: I want an attribute that if my methods return from try it will log into the responseACK table column and store the parameters, otherwise it will return Exception and if it goes ...
torcheRR-'s user avatar
1 vote
3 answers
79 views

Why does System.console() return "java.io.ProxyingConsole@7ab2bfe1" when I think it should return null?

I'm trying to make a program that will open the command line for the user to interact with when you run it. I did some research on how to do this and found this solution on stack overflow which is ...
127548935906's user avatar
0 votes
1 answer
70 views

The code for Microsoft.Exchange.WebServices version 2.2.1.0 is not working, even though the token is being generated

I have a development environment as below Visual Studio 2022 .net version 4.8 Microsoft.Exchange.WebServices version 2.2.1.0 Microsoft.Exchange.WebServices.Auth version 15.0.0.0 Microsoft.Identity....
peter's user avatar
  • 8,580
0 votes
1 answer
34 views

Trying to add dependency System.Web.UI to Console Application in Visual Studio Community 2022

I am using another piece of software that will be executing a C# Script.\ I am using VS2022 to code that script because the other software's IDE sucks. All I'm trying to do is run this code (to begin ...
Jeffrey Whitney's user avatar
0 votes
0 answers
17 views

SWIProlog crashes in gui application

When i create PlEngine pointer it crashes in gui application. But when i changed console application then this line works fine.(I'm using SWI-Prolog version 8.4.0 for x64-win64) #include <SWI-...
rumeysa's user avatar
  • 11
-1 votes
2 answers
58 views

Saving stdout from previous programs

I am currently trying to create a console menu system which allows users to use the arrow keys on the keyboard to select up and down. However, when this menu displays, I want the console to be ...
ThePenguin's user avatar
0 votes
3 answers
76 views

Console Application with params and display a guide

I'm creating a small console application with .NET8 that requires some parameters to run. I want to add an help if the parameters are empty. I read a Microsoft document where apparently it is easy to ...
Enrico's user avatar
  • 5,540
0 votes
2 answers
45 views

C# Serilog log the console output to file for each application execution (without loosing the console output) [Console application]

I'm developping a console application using .NET. This application writes a lot in the console and there is some user interaction that I would like to log into a file each time the application is ran ...
Dominique BOYER's user avatar
0 votes
1 answer
58 views

How to run 2 command in C++ CLI

I have a C++ application and i have two string with a command. One string is to change directory the second one is for a .exe file. I want to print the output from the command in my C++ project cli. ...
mallocFreestyle's user avatar
0 votes
0 answers
63 views

Access denied trying to execute c# console application

First up, I'll admit I'm a total noob at this. I'm just trying to learn, but it gets hard when I hit this kind of problem. Google hasn't provided any answers so I thought I'd ask here. I built my ...
RobG's user avatar
  • 592
0 votes
1 answer
29 views

How to inject a secret into a .NET 8 console app during the publish process?

I've developed a .NET 8 console application for distribution to a customer. This app requires a secret, but I want to ensure the secret remains confidential. I prefer not to store the secret in a file ...
LilacBlue's user avatar
  • 193
0 votes
0 answers
46 views

When i changing mac address, i have to turn off and on wifi. But how with ethernet?

I'm making a code to change the mac address temporarily, everything seems to work, but the mac address changes only, for example, in the example of wifi, not when I turn off the network card, but when ...
Filip G's user avatar
1 vote
1 answer
46 views

C# how to loop through a shared property of multiple static classes

im currently developing a simple console game and i've been stuck on how to implement the collision properly. when the player collides with an object, something should happen (for example, if the ...
jeaniedabeanie's user avatar
3 votes
1 answer
203 views

How to hide console application into Tray?

I want my console application to be hidden in the system tray after it starts. When working with a GUI application, I used TTrayIcon, and it worked without any problems. For the console application, I ...
Sashko1121's user avatar
0 votes
0 answers
37 views

How to stop C# console app from closing immediately and run function before? [duplicate]

My app requires to run function to dispose all resources and send packet about closing connection and I need to prevent insta death of my app and run some code before closing by pressing CTRL+C or ...
Kuzya The Modder's user avatar
0 votes
0 answers
30 views

Python unit test captured stdout not changing

I am writing an interpreter in Python 3.12 and my module currently outputs using Python's print function. The interpreter module can take a file name as an input. The given file is some code in the ...
bradbase's user avatar
  • 489
0 votes
0 answers
45 views

The "MICROSOFT.ACE.OLEDB.12.0" provider is not registered on the local machine

I'm using Automation Anywhere 360 where i'm calling database connect for Excel using AA360 Action (Database connect) and this is working as expected . But when i'm calling the same via console app it ...
Rajkumar Yadav's user avatar
0 votes
1 answer
44 views

Click on a Selenium button that isn't an input

I've the following HTML code: <div _ngcontent-fsi-c26="" class="col-xs-12 ng-star-inserted" style="margin-top: 3%;"> <div _ngcontent-...
Pablo Costa's user avatar
1 vote
1 answer
63 views

How to install .NET Core console app on Windows to get executed directly from command prompt

I have developed simple .NET Core 8.0 console application (app name: opengate.exe). To run this app, I have to locate the folder first on the command prompt then I can run the opengate.exe. I want ...
Neeraj Kumar Gupta's user avatar
0 votes
0 answers
81 views

Can't create an event for google analytics 4 for c# application?

I am trying to send an event to GA4 where it simply shows how many users have run the application with the code shown that I got from another question. The code requires an event to send to, but I am ...
Zrylx 's user avatar
0 votes
0 answers
47 views

Print Pixel in a console platform independant

I made a TextArt using █ (full block) characters and want to use it for a Game Project of mine. Sadly, when I try to print it, I get either undefined behavior (it outputs ª instead of █), or no ...
morigan's user avatar
  • 33
0 votes
0 answers
60 views

Why is console.clear not clearing the whole console but just half?

I'm not sure what the problem is but here is my code. When I run it, instead of clearing the console and then printing the next frame, it just prints the next frame :( I tried changing to internal ...
Tilak Rao's user avatar
0 votes
4 answers
251 views

What is the difference between Console.WriteLine and Console.Out.WriteLineAsync in an async method?

Once, when I used the cw snippet (type cwTAB) in an async method, Visual Studio would use await Console.Out.WriteLineAsync(); instead of the original Console.WriteLine();. Today I updated Visual ...
shingo's user avatar
  • 24.7k
1 vote
1 answer
98 views

Qt console application ignores inputs (cin)

I just installed Qt Creator 13.0.2 and created my first console application (left all in default): #include <QCoreApplication> #include <QDebug> #include <QString> #include <...
Batman's user avatar
  • 97
0 votes
1 answer
84 views

ml.net dont have ApplyOnnxModel

i want use ml.net and load onnx model in it. but i dont have any ApplyOnnxModel method in mlContext ... this is installed packaged <PackageReference Include="Microsoft.ML" Version=&...
abbas-h's user avatar
  • 420
1 vote
2 answers
93 views

Adding MediatoR into a C# Console Application

I previously discovered the MediatoR and I'm impressed by it and wondering how to add it to a very simple C# console application.
gary's user avatar
  • 203
0 votes
1 answer
50 views

Calling a Console App from Blazor Server web app with parameters

I have a Blazor Server app, that when a user clicks a button, it will cycle through a List , generate a pdf document and email the users in the list (over 350 pdfs and users, over 10 minutes to run). ...
AndyC's user avatar
  • 47
1 vote
0 answers
84 views

How do you capture the startup error when starting a .NET 8 console app from a .NET 4.8 application when .NET 8.0 is not installed?

I am trying to launch a .NET 8 console application from a .NET 4.8 application and capture the stdout to use that output in the .NET 4.8 application. This all works. However, if .NET 8.0 is not ...
user25640474's user avatar
0 votes
2 answers
69 views

Why is my array misaligned in the console, despite the fact that I have centered it?

I programmed a simple Convay's Game of Life as a C# console application for my own enjoyment. One of the things I want to achieve, for aesthetic reasons, is that the array which I am using to actually ...
Servus Vitae's user avatar
0 votes
0 answers
20 views

How do I keep the console window open after running a C# program? [duplicate]

Problem Statement: I'm learning C# and created a simple console application that prints 'Hello World'. However, the console window closes immediately after running the program, and I can't see the ...
Armela Mema's user avatar
0 votes
0 answers
36 views

Problems forcing python to flush print in console app

I have a console python program which does a bunch stuff analyzing excel documents. It works well but some of the operations take a long time and so I wanted to implement some progress bars for user ...
James Hoyland's user avatar
0 votes
0 answers
122 views

Windows Authentication using service account in .NET 8 console application and gMSA in Task Scheduler

EDIT: as @Panagiotis Kanavos wrote - this probably a question about the use of group managed service accounts. This is where I will try to find the reason for the error. --- original entry --- I'm ...
xpldngerror's user avatar
0 votes
0 answers
50 views

Data Scraping C# Using Selenium Looking for a Accurate Better Code for this

How do i increment the data which has a [@id="app"]/article/div/div[4]/div[2]/div[1]/ol/li[1]/div -- li[1] <-- increment each foreach so the data doesnot duplicate from the 1st row list ...
Paowix Aks's user avatar
0 votes
0 answers
42 views

How do I monitor Windows Scheduled Task for failure through console c#?

My requirement is For a specific Task, I need to get these details: 1.Last started Datetime and Last Completed Datetime 2.Errors details if any within this instance. 3.Events details. This code I have ...
KamalaH's user avatar
  • 1,346
0 votes
0 answers
90 views

Visual Studio 2022 - Refresh the process list before attempting another attach Error

When I start to Console Application on Visual Studio 2022. I refreshed an process How can I solve it? OS: Windows 10 Version: .NETFramework 4.7.2 "Refresh the process list before attempting ...
Mert Metin's user avatar
0 votes
0 answers
121 views

404 Site not found when published a Blazor Web App as class library

My use case is relatively simple. I have a basic application that references various other applications, including, most recently, a Blazor web application. Unfortunately, I have the problem that as ...
3HMonkey's user avatar
  • 137
0 votes
1 answer
99 views

Difference between Debug and Release mode in Dotnet Application in a specific scenario

I was going through to reading asynchronous programming in .NET There mention about debug and release mode of simple program using thread. Consider following code: internal class Program { static ...
Ghanshyam Mirani's user avatar
1 vote
1 answer
47 views

Storing global data in a .NET Console App

I'm making a .net console app that is an arena discord bot, and on bot startup, there will be a lot of Character data loaded from a JSON file (I'm porting a Unity app and this correlates to all the ...
Sean Gailey's user avatar
0 votes
1 answer
44 views

Problem calling executable file from ASP.NET website

I'm seeing inconsistent behavior when calling a console application from an ASP.NET web application, and can't figure out what I'm doing wrong. The C# code, which I modeled after a working web ...
swoxo's user avatar
  • 33
0 votes
0 answers
430 views

How to compile C# .NET Core app for Linux on a Windows machine

I'm new to C#, Visual Studio and .Net. I have a working machine running Windows 10 on which I write software (console app), and several test machines running different Unix systems. I need to compile ...
Alex Fiks's user avatar
-1 votes
1 answer
64 views

WPF app does not start from a Windows Service

I have a WPF app and a Console App (.NET). After publishing the Console app, it will be installed and run as a windows service. This service will check periodically for new messages from an API. If ...
May Nguyen's user avatar
0 votes
0 answers
48 views

Is there a way for my C# console app to skip an input (ReadKey) by the user after a certain amount of time?

I'm working on a C# console game for a school project and I'm wondering if there is a way to basically just skip a Console.ReadKey() after some time? I want to make a precision minigame where you have ...
pityinmiki's user avatar
0 votes
0 answers
54 views

Download multiple files in Threads in Console Application

I know there are many questions on this topic and I tried all the possible solutions but still not working. Please see my problem if you can help, much appreciated. I have created a console ...
Briskstar Technologies's user avatar
-4 votes
1 answer
209 views

How to create console application using cmd and open in VSCode? [closed]

How to create console application using cmd and open in VSCode? I'm using Visual Studio 2022. I want to open my project in Vscode as well. I want to develop frontend in Vscode. How to create console ...
Umair Khan's user avatar
0 votes
1 answer
40 views

.net console app how to check required runtime for itself at startup

I developed a console app based on .net 8.0, then I deliver the .exe (without runtime inside) to user, but I am not sure if the user have installed the .net 8.0 runtime to support this app, how could ...
leotsing's user avatar
  • 177

1
2 3 4 5
148