Couldn't find installation of Visual Studio on building with Project Launcher

CommandEnvironment.SetupBuildEnvironment: WARNING: Couldn’t find installation of Visual Studio
CommandEnvironment.SetupBuildEnvironment: WARNING: Assuming no solution compilation capability.

Hello all!
I get above errors when I try to build for my game dedicated server. Then it fails.

However I still can compile my project in the editor. With no errors.
I’ve read about messing with the registry could be the solution but I couldn’t manage to do that.

Please help,
Thanks!