I have a C# project that compiles normally. When I run the project via Visual Studio's IDE it runs fine and ends cleanly. However when I navigate to the project directory and attempt to run the program by double clicking the "exe" file or referencing it via the run window it errors out.
I have narrowed the problem down to
Console.WriteLine("output ->" + any_variable);
For some reason if I print any variable using the console.writeline the application will error if ran as described earlier.
If I take this line out, the executable created by the Visual Studio will run just fine if i double click on it. I'm really confused by this. My goal here is to create this command line project as a scheduled task.