UnrealBuildTool files gone? Invalid Class when building

As I am first setting up any project, I am unable to build from VS2013 Ultimate. Because of my past experience with this bug and finding a work around for it I know exactly what the problem is.

A look at UE4\Engine\Source\Programs\UnrealBuildTool\System\LocalExecutor.cs:line 249 has a block of code that I would usually comment out (determining how many cores it can build with) But those files are no longer present.

Not sure how this can be resolved now. Where the files moved to somewhere else? This is on UE4.1

So, I downloaded a branch from GitHub and it appears to be in there. Any of figuring out why these lines would cause UE4 to loose it’s mind?

if (!Utils.IsRunningOnMono)
			{
				foreach(var Item in new System.Management.ManagementObjectSearcher("Select * from Win32_Processor").Get())
				{
					NumCores += int.Parse(Item["NumberOfCores"].ToString());
				}
			}

Just to confirm, commenting these lines out fixed the problem. I assume it’s a bug that will be fairly low on the priority list.

Hi . Would you mind providing a little more information about the issue you have been experiencing? When you create a new project, are you using one of the project templates? Does this only happen with one template, or all of them? What is the error message you receive when you first try to build the project in VS? Have you tried using a different version of VS other than Ultimate? Are you using UE4 that is built from source, or are you using the binary version installed through the Launcher?

Thanks

Hi , No problem, Hope I can help you track down the problem.

This happened both in Visual Studio 2010 SP1 (before 4.0.0 was released) and 2013 Ultimate.

This happened on a blank project without starter assets. Also on the strategy template so I assume all of them.

I tried using the built UE4 binary but it caused this error so I had to get the source code one. (which in itself would not compile until I made the change because it’s in UnrealBuildTool.

Error from my QA Build in the past. same on 4.1.0 though. Scott Sherman helped me find this workaround back in June.

1>------ Rebuild All started: Project: QAGame (Build and Run\QAGame\QAGame), Configuration: Development x64 ------
1>Build started 12/06/2013 9:09:50 AM.
1>Rebuild:
1>  Building UnrealHeaderTool...
1>EXEC : error : System.Management.ManagementException: Invalid class
1>     at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)
1>     at System.Management.ManagementObjectCollection.ManagementObjectEnumerator.MoveNext()
1>     at UnrealBuildTool.LocalExecutor.ExecuteActions(List`1 Actions) in Engine\Source\Programs\UnrealBuildTool\System\LocalExecutor.cs:line 249
1>     at UnrealBuildTool.UnrealBuildTool.ExecuteActions(List`1 ActionsToExecute, String& ExecutorName) in Engine\Source\Programs\UnrealBuildTool\System\ActionGraph.cs:line 253
1>     at UnrealBuildTool.UnrealBuildTool.RunUBT(String[] Arguments) in Engine\Source\Programs\UnrealBuildTool\System\UnrealBuildTool.cs:line 896
1>  Cumulative action seconds (8 processors): 0.00 building projects, 0.00 compiling, 0.00 creating app bundles, 0.00 generating debug info, 0.00 linking, 0.00 other
1>  UBT execution time: 2.74 seconds
1>EXEC : error : UnrealHeaderTool failed for target 'QAGame' (platform: Win64, module info: ).
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(43,5): error MSB3073: The command "..\..\..\Build\BatchFiles\Rebuild.bat QAGame Win64 Development" exited with code 1.