Cannot build : System.ComponentModel.Win32Exception

Hi there,

I downloaded 4.20 and wanted to make transition from a 4.19 project.
The build failed, and here was the error log in VS 2017 :

Running C:/Program Files/Epic Games/UE_4.20/Engine/Binaries/DotNET/UnrealBuildTool.exe Development Win64 -Project="C:/Users/Thomas/Documents/Unreal Projects/OdenGate 4.20/OdenGate.uproject" -TargetType=Editor -Progress -NoHotReloadFromIDE
Using 'git status' to determine working set for adaptive non-unity build.
Performing full C++ include scan (no include cache file)
@progress push 5%
@progress pop
Building 13 actions with 4 processes...
  @progress 'Compiling C++ source code...' 0%

Exception non g?r?e?: System.ComponentModel.Win32Exception: Le fichier sp?cifi? est introuvable
   ? Tools.DotNETCommon.ManagedProcess..ctor(ManagedProcessGroup Group, String FileName, String CommandLine, String WorkingDirectory, IReadOnlyDictionary`2 Environment, String Input, ManagedProcessPriority Priority) dans D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\DotNETCommon\DotNETUtilities\ManagedProcess.cs:ligne 344
   ? UnrealBuildTool.ParallelExecutor.ExecuteAction(ManagedProcessGroup ProcessGroup, BuildAction Action, List`1 CompletedActions, AutoResetEvent CompletedEvent) dans D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\System\ParallelExecutor.cs:ligne 252
   ? UnrealBuildTool.ParallelExecutor.<>c__DisplayClass8_1.<ExecuteActions>b__1() dans D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\System\ParallelExecutor.cs:ligne 166
   ? System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   ? System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   ? System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   ? System.Threading.ThreadHelper.ThreadStart()
LogInit: Warning: Still incompatible or missing module: OdenGate
LogExit: Preparing to exit.

(it’s french, sorry, but it says : Unhandled exception: System.ComponentModel.Win32Exception: Unable to find the specified file)

Have you got any clue for me?

Precisions:

  • It isn’t an android project, it’s only a computer one
  • I’ve got the last .NET Framework version available
  • I’ve got the last VS 2017 available
  • It still builds in 4.19
  • I didn’t make any editing to the 4.20 copy of the project

Thank you for your help :slight_smile:

We’ve got the exact same issue - PC project, from 4.19, works there - has same stack when trying to build under 4.20

Ok, don’t hesitate to answer here if you find a solution!
I’m going to make some tests, trying to recreate a clean project and copy the C++ files in it.

Ok, I found a solution, but it’s not a pretty one ^^

1 - Create a new C++ blank project, name it as your project (if it’s not the same version it should be fine).

2 - Copy all the C++ files from your old project to your new one, in your Source folder, and don’t replace target.cs files, nor [project_name].h, .cpp, .build.cs. Instead, let the generated ones. If you have any code in there, open both files and copy the code by hand.

3 - Regenerate the solution on VS 2017

4 - Copy all the content from your old project to your new one, in the Content folder.

5 - Launch UE4 and build!

It should be fine, it worked for me, after few trials and errors. You should be careful about the orders of the steps I describe because if you open UE4 with the content in the new project and you still haven’t built the C++ code, it might end up broken. In this case, delete all content and retry from step 3.

Hope this works for you H8weaver :slight_smile:

For me it was enough to delete all the UE generated folders from the project and rebuild from VS.

Yes, you are right, thank you so much. By deleting the Binaries and Intermediate folder before regenerate visial studio project files, my project compiles again.

Thanks, deleting the UE generated folders then building via VS worked for me too.