Error MSB3075.. -waitmutex" exited with code 5. Please verify that you have sufficient rights to run this command

I’m using different version of Visual Studio (run as admin 2013, 2015, 2017) and Unreal Engine (4.14, 4.15, 4.16) - result the same:
If project is allocated on disk D for example (not C), Visual Studio can’t build it.

1>------ Build started: Project: testcpp, Configuration: Development_Editor x64 ------
1>Creating makefile for hot reloading testcppEditor (no existing makefile)
1>EXEC : error : System.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\UE_Projects\testcpp\testcpp.uproject'.
1>   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
1>   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
1>   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
1>   at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
1>   at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost)
1>   at UnrealBuildTool.JsonObject.Read(String FileName)
1>   at UnrealBuildTool.ProjectDescriptor.FromFile(String FileName)
1>   at UnrealBuildTool.RulesCompiler.CreateProjectRulesAssembly(FileReference ProjectFileName)
1>   at UnrealBuildTool.UEBuildTarget.CreateTarget(TargetDescriptor Desc, String[] Arguments, Boolean bCompilingSingleFile)
1>   at UnrealBuildTool.UnrealBuildTool.RunUBT(BuildConfiguration BuildConfiguration, String[] Arguments, FileReference ProjectFile)
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets(44,5): error MSB3075: The command ""D:\Program_D\Epic Games\UE_4.16\Engine\Build\BatchFiles\Build.bat" testcppEditor Win64 Development "D:\!WORK\!UE_Projects\testcpp\testcpp.uproject" -waitmutex" exited with code 5. Please verify that you have sufficient rights to run this command.
1>Done building project "testcpp.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Somebody can help with it?)

The Compiler says it’s trying to find the project file at: ‘D:\UE_Projects\testcpp\testcpp.uproject’

But your arguments say: "“D:!WORK!UE_Projects\testcpp\testcpp.uproject”

Which is the correct location? Also, have you tried moving your project to a directory without the ! character in the name?

super fast and right answer which I ever get before,
Thank you very much!
please put it in answer so I can accept it)

“!” sign in the path break it )

“!” sign in the path break it :wink:

I want to add an answer here as well. I have been building on disk D:. Just recently it stopped. The way I worked around it was to build and compile in Unreal. It works, provided there are no errors, every time. VS is a quirky beast. Try to use work arounds whenever possible. To add to this - my path was correct and nothing seemed different. I even went to a previous build but VS just would not complile and build.


If those two answers are useless,Try mine.


I spent almost half day to search for the solution to this.Finally, I found something useful.


You can refer these two links above. Both the same, either one will be fine.


For your convenient, I copyed it :

This is a known issue with changing to 4.12 and using tasks. It can be resolved by simply adding “GameplayTasks” to the PublicDependencyModuleNames section inside your ‘ProjectName’.Build.cs For example:
PublicDependencyModuleNames.AddRange(new string[] { “Core”, “CoreUObject”, “Engine”, “InputCore”, “AIModule”, “GameplayTasks” });


Add GameplayTasks to PublicDependencyModuleNames of the YourProjectName.Build.cs file~.

Exactly the solution to my problem, thank you so much!

Useful,Thank you very much

I ran into this same problem when upgrading from 4.20 to 4.21. I tried a few things, but what seemed to work for me was just modifying any of my header of cpp files in any way (I just added a line and commented it out)