"Refresh Visual Studio Project" fails with "The given path's format is not supported"

When I run File->“Refresh Visual Studio Project” from UE editor, the following error is displayed:

An error occurred while trying to generate project files.
Running C:/Unreal/Epic Games/4.9/Engine/Binaries/DotNET/UnrealBuildTool.exe -projectfiles -project=“D:/unreal_projects/Warlock/Warlock.uproject” -game -rocket -progress
Discovering modules, targets and source code for game…
ERROR: System.NotSupportedException: The given path’s format is not supported.
at System.Security.Permissions.FileIOPermission.QuickDemand(FileIOPermissionAccess access, String fullPath, Boolean checkForDuplicates, Boolean needFullPath)
at UnrealBuildTool.BuildReceipt.InsertStandardPathVariablesToString(String InputPath, String EnginePrefix, String ProjectPrefix)
at UnrealBuildTool.BuildReceipt.InsertStandardPathVariables(String EngineDir, String ProjectDir)
at UnrealBuildTool.UEBuildTarget.PrepareReceipt(IUEToolChain ToolChain)
at UnrealBuildTool.UEBuildTarget.Build(IUEToolChain TargetToolChain, List1& OutputItems, List1& UObjectModules, String& EULAViolationWarning)
at UnrealBuildTool.UnrealBuildTool.RunUBT(String[] Arguments)

Engine version: 4.9.2
Engine is installed at: C:/Unreal/Epic Games/4.9
Project location: D:/unreal_projects/Warlock

The Compile button works and compiles successfully.

Hey -

Do you get this error in a new code project with no added code? Let me know if you see this with projects created on either the C:\ or D:\ drives. If this doesn’t give you the same error can you try opening the project that this is happening for in Visual Studio and try building the project there?


I have removed the Plugins directory and after that “Refresh Visual Studio Project” succeeds.

So I guess the issue is resolved.

Only suggestion is that the error message could be more informative and indicate which path is the problem.