Can't create any c++ project

All I’m trying to do is create a new c++ project in UE4, but I get this error when I click create project:

Failed to generate project files. Log
output: Running C:/Program
Files/Unreal
Engine/4.6/Engine/Binaries/DotNET/UnrealBuildTool.exe
-projectfiles -project=“C:/Users/Van/Documents/Unreal
Projects/SpaceSim/SpaceSim.uproject”
-game -rocket -progress Discovering modules, targets and source code for
game… UnrealBuildTool Exception:
System.ArgumentOutOfRangeException:
Length cannot be less than zero.
Parameter name: length at
System.String.InternalSubStringWithChecks(Int32
startIndex, Int32 length, Boolean
fAlwaysCopy) at
UnrealBuildTool.Utils.SetEnvironmentVariablesFromBatchFile(String
BatchFileName) at
UnrealBuildTool.VCEnvironment…ctor(CPPTargetPlatform
InPlatform) at
UnrealBuildTool.VCToolChain.GetVCIncludePaths(CPPTargetPlatform
Platform) at
UnrealBuildTool.VCProjectFile.WriteProjectFile(List1 InPlatforms, List1 InConfigurations)
at
UnrealBuildTool.ProjectFileGenerator.WriteProjectFiles()
at
UnrealBuildTool.ProjectFileGenerator.GenerateProjectFiles(String
Arguments, Boolean& bSuccess) at
UnrealBuildTool.UnrealBuildTool.GenerateProjectFiles(ProjectFileGenerator
Generator, String Arguments) at
UnrealBuildTool.UnrealBuildTool.Main(String
Arguments)

Blueprint projects work fine, but I can’t create a C++ one anymore. Anyone know whats going on?

Uninstalled and reinstalled both Unreal Engine and Visual Studio. Same problem.

I’m not sure but try compiling the engine itself first , and also register engine directory.(to register look at UnrealEngine-4.x\Engine\Binaries\Win64\UnrealVersionSelector-Win64-Shipping)…

This is the binary version of the engine. Can I still compile it?

I think you can, : \Unreal Projects[ProjectName][ProjectName].UnrealEngine

Doesnt exist. Project didnt get far enough in the creation process I guess

If you are running your unreal engine launcher through steam, don’t. You get this exact error.

Has anyone found a solution for this?