My narritive into the unknown
So.. Just returned to the Windows world, for a C# project. Where better than Visual Studio?
I've been in the .NET world before, it's a pleasure, always enjoyed it. It started out the same, annoyingly good. Some details have changes, something about .NET core, really don't care, everything is going good.
But then BANG, Visual Studio is crashing. HARD, no error messages, where would I even check? I launched it from PowerShell but it doesn't output anything.
If I delete bin/
from the Project directory Visual Studio will open, strange.
But once I build+run the project, it exits normally, then Visual Studio goes
poof and crashes.
Again, delete bin/
and Visual Studio will open the Project. So lets look in
there, nested in it is a directory called
(space). File Explorer doesn't
like it. I assume somewhere a variable isn't set, checking out the project file,
and the solution, because they are different things. They look OK, I mean, I
don't know what the fuck I'm doing, but it looked fine.
Oh, great, I messed with .NET vs core things, I didn't understand that, I must have fucked my Visual Studio config some how. And it's not a simple file to check, or anything, but I can nuke it.
But that didn't help. New solution, new project file, same. I hate this, I hate my life.
So what had changed in my code, I can't remember I've been debugging forever...
The code is basically:
string path = @"C: \Users\cj\working";
Directory.CreateDirectory(path);
Runs fine as a built exe, expected outcome, but when ran through Visual Studio, crash.
And there it is. FUCK ME. Did you see it, because I didn't! A stray space in one of my file paths, in my code was causing Visual Studio to crash.