[Mac OS X] Build default C++ project error

When trying to build a default template project, the following errors are displayed in XCode:

Building ExampleProject_1Editor…
Compiling with Mac SDK 10.9
Parsing headers for ExampleProject_1Editor
Code generation finished for ExampleProject_1Editor and took 7.517
ERROR: System.IO.FileNotFoundException: Could not load file or assembly ‘System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies.
File name: ‘System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’
at UnrealBuildTool.UnrealBuildTool.ExecuteActions (System.Collections.Generic.List`1 ActionsToExecute, System.String& ExecutorName) [0x00000] in :0
at UnrealBuildTool.UnrealBuildTool.RunUBT (System.String[] Arguments) [0x00000] in :0
Cumulative action seconds (4 processors): 0.00 building projects, 0.00 compiling, 0.00 creating app bundles, 0.00 generating debug info, 0.00 linking, 0.00 other
UBT execution time: 17.47 seconds
Command /Users/Shared/UnrealEngine/4.2/Engine/Build/BatchFiles/Mac/RocketBuild.sh failed with exit code 2

Do you have Mono installed on your Mac? If you do, what version? You can check that by opening terminal and typing mono --version. Thanks.

I use mono:
Mono JIT compiler version 3.2.6 ((no/9b58377 Thu Jan 16 17:49:56 EST 2014)
Copyright (C) 2002-2012 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: normal
SIGSEGV: altstack
Notification: kqueue
Architecture: x86
Disabled: none
Misc: softdebug
LLVM: yes(3.3svn-mono-(no/8bdedb5)
GC: sgen

I update mono to 3.4.0, It works. Thank you.

Actually, 3.2.6 should work, but I’m glad you solve this by updating to latest.

So, does that mean, that we now need Mono to build a project on the Mac?

I appear to be experiencing the same error here. But, although I have a very old Mono install gathering dust somewhere on my system, I do not intend to use it.

Is there a way, to solve this without MonoDevelop?

Do you also have Mono 3.2.6? What OS X version do you use?

Mono 3.2.6 is the only version of Mono we’ve had no major problems with. By default UE4 uses the stripped down 3.2.6 build we bundle with the engine, unless user has 3.2.6 installed. What I think happened in bman’s case was that his installed Mono was broken or somehow incompatible with UE4 (I would love to know what it was exactly) and when he updated to 3.4, the engine started using the bundled Mono, which worked OK.

…meaning, that I should be OK, if I simply delete the Mono I do have installed?

I am sorry, but I still don’t quite get it… So UE is earching the system for a usable Mono and falls back to it’s own bundled version, when it doesn’t find one?

Can I somehow force it, to use it’s own version?

Because I believe otherwise, there could be a problem with Unity, which I have also installed, and which brings it’s own Version of Mono along. I just checked again, there is no other version of Mono on my System, than the one, comming with Unity3D.

Versionwise, we’re talking UE 4.4.2 on a OsX 10.9.4 with XCode 5.1.1

Yes, UE4 is searching system for usable Mono and only uses its own if it didn’t find it. And yes, you should be OK if you uninstall Mono you have.

But…

You can force UE to always use its own Mono by editing SetupMono.sh file in engine’s Engine/Build/BatchFiles/Mac folder - comment out lines 15 and 16 with # character (like lines 17 an 18).

Thanks, for your time. Got it working now, by uninstalling mono.

No problem. Glad it’s working now.