All Questions
527
questions
0
votes
0
answers
14
views
MSTest Serilog Console issue
I have a library C# project which has services written. This is using serilog and able to print serilogs on console during normal execution. But when I am using same library within my functional test ...
0
votes
1
answer
29
views
How to disable non-intended user input in the terminal C#
When i write a infinite loop that doesn't have any behaviour on its body, the user still have the possibility to write text at it, even without calling any input function:
Note: I'm using Linux, ...
0
votes
1
answer
37
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 ...
1
vote
2
answers
69
views
C# Console converts tabs to spaces
If I print string such:
Console.WriteLine(@"test1\ttest2\ttest3")
and try to copy the output to excel it will all be in one column, because the Console prints tabs as spaces, is it possible ...
0
votes
0
answers
12
views
How to call without showing number using Twilio using C# API
I need to connect two customer via voice call, but I want to hide original phone number from each other. I thought to implement it using twilio.
when i run the console app i have an error the error ...
0
votes
0
answers
52
views
How to parse large json file in c# to avoid Out of memory exception
I have json file stored in text file which is of size 40 GB+.I am using below code which is throwing Out of memory exception. Is there any way we can take part by part of text file and parse ,...
1
vote
2
answers
54
views
Why can't I change the value of a mock object property that hasn't been set up?
I'm new to unit testing, and I'm writing unit tests for .NET C# applications. To create mocks, I use the MOQ NuGet package in my test project. I have an interface with two properties:
public interface ...
0
votes
0
answers
46
views
C# console app crashes when running batch file which exist in different directory
I have a batch file, which I need to run from my c# application. Batch file location is different from my c# console app exe location.
I'm trying below code, my c# console app crashes after calling ...
0
votes
1
answer
155
views
Serilog console logging with ThreadId
I have a console application with Target framework 8.0.
I would like to log ThreadId to console output of my serilog log. ThreadId is getting logged to json file but in console it does not log ...
1
vote
1
answer
237
views
C# Cannot maximize Console from within the code
I tried Maximizing the Console .NET application using C# commands, but it doesn't work.
EDIT: I feel the need to specify that I use "Console App (.NET Framework)" and not "(Console App (...
1
vote
1
answer
98
views
DI/HttpContext in custom ConsoleFormatter
In my custom ConsoleFormatter I need to get a value from a service added to the DI. This value is saved in a SCOPED service because it generates a new value for every new request but should keep the ...
1
vote
2
answers
318
views
How to debug multiple console applications with VSCode in C#
I have a solution with multiple console apps and I want to debug the selected one like in Visual Studio. Is there a way to do it?
I found that the only way for me was to delete launch.json and add it ...
0
votes
1
answer
44
views
My URI failed to launch my console app from my web app
I'm trying to open a console app in .NET from my ASP.NET Core MVC web app. In order to open a console app remotely without knowing the path of the file.
I created the key in the editor register, but ...
0
votes
0
answers
68
views
C# WinForms how to have a console inside a form
So I'm working on a project called PteroController, and I'm trying to find a way to display a console inside a form, so I can show the console output I get from a web socket, which can be color coded ...
0
votes
0
answers
34
views
.net 7 console app randomly terminates without any error message
I have an odd issue that I have a .NET 7 Console App that terminates in random places without giving any error message! I had the same issue when it was running in .NET 6.
It does the same thing ...