✅ Console.WriteLine Broken

For some reason my program stopped logging to console, i rolled the code back to the very basics (hello world) and it still won't. My csproj doesn't contain any thing special either. It's not about the VS debug window and i double checked in a "normal" power shell outside of VS Code, just in case.
No description
14 Replies
Bored Student
Bored StudentOP5w ago
Console.Error.WriteLine(""); is affected as well
SG97
SG975w ago
what's inside Problems by default, in csproj, the OutputType is Exe
SG97
SG975w ago
Breaking change: OutputType set to WinExe for WPF and WinForms apps...
Learn about the breaking change in .NET SDK 5.0.100 where OutputType is automatically set to WinExe for Windows Forms apps.
Bored Student
Bored StudentOP5w ago
nothing anymore
SG97
SG975w ago
I can reproduce the problem with winexe but not with WinExe or Exe , edit: Exe works for me
Bored Student
Bored StudentOP5w ago
ik, wenn it worked i used a windows specifc device Driver
SG97
SG975w ago
is this a winforms / wpf project?
Bored Student
Bored StudentOP5w ago
no just console
SG97
SG975w ago
then just use Exe ?
Bored Student
Bored StudentOP5w ago
it works again with exe, but then the driver throws "Unsupported Platform Exception"
SG97
SG975w ago
ok, so there's another problem what driver is this
Bored Student
Bored StudentOP5w ago
not currently, but "Hello World" isn't then program i want to end with. unfortunately a confidential one, but from the hardware manufactuer, i can't change it.
SG97
SG975w ago
it'll be a bit hard to help
Bored Student
Bored StudentOP5w ago
so i suppose the workaround would be to use the console in a different way IK, but that's not really a priority when classifying IP 🤷 😔

Did you find this page helpful?