[4.7] UnrealBuildTool Failed to generate project files

After updating to Unreal Engine 4.7 I can no longer generate project files or compile any C++ projects. Below is the error I get when I attempt to generate project files:

Running C:/Program Files/Unreal Engine/4.7/Engine/Binaries/DotNET/UnrealBuildTool.exe -projectfiles -project="C:/Users/Xennma/Documents/Unreal Projects/ShooterGame3/ShooterGame3.uproject" -game -rocket -progress
Discovering modules, targets and source code for game...
UnrealBuildTool Exception: System.IO.IOException: The file exists.

   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.Path.InternalGetTempFileName(Boolean checkHost)
   at UnrealBuildTool.Utils.SetEnvironmentVariablesFromBatchFile(String BatchFileName)
   at UnrealBuildTool.VCEnvironment..ctor(CPPTargetPlatform InPlatform)
   at UnrealBuildTool.VCToolChain.GetVCIncludePaths(CPPTargetPlatform Platform)
   at UnrealBuildTool.VCProjectFile.WriteProjectFile(List`1 InPlatforms, List`1 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)

I have Visual Studio 2013 Ultimate installed running on Windows 7 64 bit.

I get the same thing even after downloading the 4.7.1 hotfix as well.

Same problem here with version 4.6.1, it was working fine until yesterday, no idea what happened.

BTW I uninstalled and installed unreal and visual studio, updated unreal to 4.7 and tried with visual studio professional 2013 and community 2013. And the error keep there.

So I figured out the problem. I cleared out my C:\Users< username >\AppData\local\Temp folder and it now works perfect once again. I’m unsure why exactly this fixed the problem however I did have about 50GB worth of data split between over 200,000 files in it. Hopefully this can help other people fix the issue as well.

Yeah thanks, I found the solution at the same time here:

http://stackoverflow.com/questions/18350699/system-io-ioexception-the-file-exists-when-using-system-io-path-gettempfilena

Thanks.