Generate Visual Studio project files not working

Hey there,
so I was working on my little project recently (using blueprints), and I wanted to create a C++ class, but when I create one, it gives me an error that I need to recompile the project manually. When I rightclick the project file and click on the “Generate Visual Studio project files” button, I’ll end up with this (when the generation process ends, it automatically closes the window, so I had to spam PrintScreen button):

I have installed both Visual Studio 2017 and Visual Studio 2015 installed.

Thanks for any suggestion.

Delete the following temporary folders:
Binaries, build, intermediate and saved.
Delete the visual studio project file, if existing.

Open the unreal project file. In the project settings under „code“ set the correct code editor.
Right klick on the project file and crate the visual studio project file.