# What is causing this build error from source: Build.bat -Target="ShaderCompileWorker" -WaitMutex -FromMsBuild" exited with code 6

**URL:** <https://forums.unrealengine.com/t/what-is-causing-this-build-error-from-source-build-bat-target-shadercompileworker-waitmutex-frommsbuild-exited-with-code-6/480098>\
**Category:** C++\
**Tags:** error, unreal-engine, building, Visual-Studio, CPP, question, build-editor\
**Created:** [March 11, 2021, 9:45am UTC](https://forums.unrealengine.com/t/what-is-causing-this-build-error-from-source-build-bat-target-shadercompileworker-waitmutex-frommsbuild-exited-with-code-6/480098 "2021-03-11T09:45:43Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![jamiewhitephd](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jamiewhitephd](https://forums.unrealengine.com/u/jamiewhitephd)\
**Post date:** [March 11, 2021, 9:45am UTC](https://forums.unrealengine.com/t/what-is-causing-this-build-error-from-source-build-bat-target-shadercompileworker-waitmutex-frommsbuild-exited-with-code-6/480098/1 "2021-03-11T09:45:43Z")

</div>

We are using the 4.25 source code for a project and out of nowhere this error started popping up when trying to compile the project/engines code:

> Severity Code Description Project File Line Suppression State  
> Error MSB3073 The command “…..\Build\BatchFiles\Build.bat -Target=“MyProjectEditor Win64 Development” -Target=“ShaderCompileWorker Win64 Development -Quiet” -WaitMutex -FromMsBuild” exited with code 6. MyProject C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets 46

Has anyone encountered this before? I have seen similar issues after some searching, but nothing related to this message.

---

<div class="post-metadata">

**Author:** ![jamiewhitephd](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jamiewhitephd](https://forums.unrealengine.com/u/jamiewhitephd)\
**Post date:** [March 11, 2021, 10:31am UTC](https://forums.unrealengine.com/t/what-is-causing-this-build-error-from-source-build-bat-target-shadercompileworker-waitmutex-frommsbuild-exited-with-code-6/480098/2 "2021-03-11T10:31:14Z")

</div>

If it helps:  
Microsoft Visual Studio Community 2019  
Version 16.9.0

---

<div class="post-metadata">

**Author:** ![Mike\_M](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mike\_M](https://forums.unrealengine.com/u/Mike_M)\
**Post date:** [March 11, 2021, 2:13pm UTC](https://forums.unrealengine.com/t/what-is-causing-this-build-error-from-source-build-bat-target-shadercompileworker-waitmutex-frommsbuild-exited-with-code-6/480098/3 "2021-03-11T14:13:53Z")

</div>

Same issue here

Severity Code Description Project File Line Suppression State  
Error MSB3073 The command ““D:\Epic Games\UE\_4.26\Engine\Build\BatchFiles\Build.bat” Edit\_BP\_via\_CPPEditor Win64 Development -Project=“D:\tests\Edit\_BP\_via\_CPP\Edit\_BP\_via\_CPP.uproject” -WaitMutex -FromMsBuild” exited with code 6. Edit\_BP\_via\_CPP C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets 46

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a0d583d2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a0d583d2](https://forums.unrealengine.com/u/anonymous_user_a0d583d2)\
**Post date:** [March 21, 2021, 3:01am UTC](https://forums.unrealengine.com/t/what-is-causing-this-build-error-from-source-build-bat-target-shadercompileworker-waitmutex-frommsbuild-exited-with-code-6/480098/4 "2021-03-21T03:01:07Z")

</div>

Same issue, can’t use C++ at all in Unreal Engine 4.26.1. I don’t have the issue in 4.25.4.

C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command ““C:\Program Files\Epic Games\UE\_4.26\Engine\Build\BatchFiles\Build.bat” ToonTanksEditor Win64 Development -Project=“C:\Users\Documents\Unreal Projects\ToonTanks 4.26\ToonTanks.uproject” -WaitMutex -FromMsBuild” exited with code 6.

---

<div class="post-metadata">

**Author:** ![JasonK](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JasonK](https://forums.unrealengine.com/u/JasonK)\
**Post date:** [April 14, 2021, 4:34am UTC](https://forums.unrealengine.com/t/what-is-causing-this-build-error-from-source-build-bat-target-shadercompileworker-waitmutex-frommsbuild-exited-with-code-6/480098/5 "2021-04-14T04:34:18Z")

</div>

I also had this problem. What worked for me was to go into the editor and select File → Refresh Visual Studio Project.

After that I was able to build the project without issue.

---

<div class="post-metadata">

**Author:** ![PISCOMAI](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PISCOMAI](https://forums.unrealengine.com/u/PISCOMAI)\
**Post date:** [May 22, 2022, 3:32am UTC](https://forums.unrealengine.com/t/what-is-causing-this-build-error-from-source-build-bat-target-shadercompileworker-waitmutex-frommsbuild-exited-with-code-6/480098/6 "2022-05-22T03:32:19Z")

</div>

didn’t work for me…

---

<div class="post-metadata">

**Author:** ![dangerousbob88](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dangerousbob88/32/1194594_2.png) [@dangerousbob88](https://forums.unrealengine.com/u/dangerousbob88)\
**Post date:** [July 26, 2022, 4:30pm UTC](https://forums.unrealengine.com/t/what-is-causing-this-build-error-from-source-build-bat-target-shadercompileworker-waitmutex-frommsbuild-exited-with-code-6/480098/7 "2022-07-26T16:30:42Z")

</div>

I am having the same problem trying to build 4.27 from Source. I get the same error. Did you ever find a solution?

---

<div class="post-metadata">

**Author:** ![PP\_Wang](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PP\_Wang](https://forums.unrealengine.com/u/PP_Wang)\
**Post date:** [November 8, 2022, 5:59am UTC](https://forums.unrealengine.com/t/what-is-causing-this-build-error-from-source-build-bat-target-shadercompileworker-waitmutex-frommsbuild-exited-with-code-6/480098/8 "2022-11-08T05:59:07Z")

</div>

Right-click on the Solution in VS2022 Solution Explorer and select Batch Build, Choose the Clean button, and then rebuild the project. Remember to restart the editor after the successful build.

---

<div class="post-metadata">

**Author:** ![dominic.harvey01](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dominic.harvey01](https://forums.unrealengine.com/u/dominic.harvey01)\
**Post date:** [November 16, 2022, 3:46am UTC](https://forums.unrealengine.com/t/what-is-causing-this-build-error-from-source-build-bat-target-shadercompileworker-waitmutex-frommsbuild-exited-with-code-6/480098/9 "2022-11-16T03:46:16Z")

</div>

I had the same issue on UE 5.1.0/Rider 2022.2.4 and it started when I enabled Live Coding. Disabling it resolved the issue.
