MonoUE - C# and F# for UE4

Posted by Mikayla Hutchinson on the projects mailing list:
*I’m pleased to announce the first preview of MonoUE, a plugin for Unreal Engine that allows writing gameplay code with C# or F#.

The plugin has been developed with the support of Microsoft, but is currently a personal side project of several Microsoft employees. It is not officially supported by either Microsoft or Epic. We are making it freely available as source to all Unreal Engine licensees in the hope that the community considers it useful and participates in its development.

The plugin is still a work in progress: IDE integration, debugging, deployment and hot reloading are not supported in this initial release. There are currently no binaries, and you must build the engine from source code following the instructions on the web site:

I look forward to see where the larger community wants to take this!

  • mikayla*

Please keep discussions focused on this particular plugin. There are other threads about the general merit of C# for UE4 scripting.

/me waves :slight_smile:

Has anyone been able to build this plugin successfullly?

Are you seeing errors? Could you share them?

Taking a look…

No build error. It just crash at start up due to an exception of loading Mono. Trying a completely clean build now, lets see how it goes. I am on my 4 to 5th try on building this plugin from source. Just my luck, may be.

Edit: Got to compile correctly on the 5th try. The problem could be that when the project open up, it gave me an option to upgrade the project. The first 4 tries (failed) was when I accepted the project upgrade. The 5th try (succeed) is when I didn’t accept the project upgrade.

Are you on Mac or Windows? What versions of Windows/VS/MacOS/Xcode? Which configuration of the engine are you building?

FWIW, on Windows I’m running Visual Studio 15.3 preview and the Windows 10 insider preview… maybe the Mono binary I built for the dependencies zip ended up depending on some new version of the C runtime or something.

Can you run it in a debugger and capture the crash trace?

I deleted the last installation and redo the install instruction and the crash went away. Sorry, can’t provide debugger or crash trace (files are gone). I am encountering another problem “Failed building managed assemblies in solution” when I try to create a new C# project.

I am using Window 7. Visual Studio 2017 (15.2). I am using the https://github.com/mono-ue/UnrealEngine branch.

Error from Console



LogAndroidPermission: UAndroidPermissionCallbackProxy::GetInstance
LogMono: Found assembly mscorlib.dll at path '../../../Engine/Plugins/MonoUE/ThirdParty/mono/fx/MonoUE/v1.0/mscorlib.dll'.
LogMono: Loaded assembly from path '../../../Engine/Plugins/MonoUE/ThirdParty/mono/fx/MonoUE/v1.0/mscorlib.dll'.
LogMono: Loaded Mono runtime 5.5.0 (Visual Studio built mono)
LogMono: Found assembly UnrealEngine.MainDomain.dll at path '../../../Engine/Plugins/MonoUE/Binaries/Win64/MonoEditor/UnrealEngine.MainDomain.dll'.
LogMono: Loaded assembly from path '../../../Engine/Plugins/MonoUE/Binaries/Win64/MonoEditor/UnrealEngine.MainDomain.dll'.
LogWindowsTextInputMethodSystem:Display: IME system now deactivated.
Running D:/GitHub/UnrealEngine/Engine/Plugins/MonoUE/Binaries/DotNET/MonoGenerateProjects.exe "D:/GitHub/UnrealEngine" "F:/UE4_Projects/CS_TestOne/" CS_TestOne "F:/UE4_Projects/CS_TestOne/"
Running C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\bin\MSBuild.exe  "/property:Configuration=Development Editor" "/property:Platform=Win64" /nologo /verbosity:minimal  "F:/UE4_Projects/CS_TestOne/CS_TestOne_Managed.sln"
obj\Win64\Development Editor\MonoUE4\helpers\InputIniHelpers.g.cs(11,17): error CS1003: Syntax error, '(' expected [F:\UE4_Projects\CS_TestOne\Source\CS_TestOneMono\CS_TestOneMono.csproj]
obj\Win64\Development Editor\MonoUE4\helpers\InputIniHelpers.g.cs(11,17): error CS1041: Identifier expected; 'in' is a keyword [F:\UE4_Projects\CS_TestOne\Source\CS_TestOneMono\CS_TestOneMono.csproj]
obj\Win64\Development Editor\MonoUE4\helpers\InputIniHelpers.g.cs(11,31): error CS1003: Syntax error, ',' expected [F:\UE4_Projects\CS_TestOne\Source\CS_TestOneMono\CS_TestOneMono.csproj]
obj\Win64\Development Editor\MonoUE4\helpers\InputIniHelpers.g.cs(11,36): error CS1001: Identifier expected [F:\UE4_Projects\CS_TestOne\Source\CS_TestOneMono\CS_TestOneMono.csproj]
obj\Win64\Development Editor\MonoUE4\helpers\InputIniHelpers.g.cs(11,36): error CS1003: Syntax error, ',' expected [F:\UE4_Projects\CS_TestOne\Source\CS_TestOneMono\CS_TestOneMono.csproj]
obj\Win64\Development Editor\MonoUE4\helpers\InputIniHelpers.g.cs(11,40): error CS1003: Syntax error, ',' expected [F:\UE4_Projects\CS_TestOne\Source\CS_TestOneMono\CS_TestOneMono.csproj]
obj\Win64\Development Editor\MonoUE4\helpers\InputIniHelpers.g.cs(11,59): error CS1003: Syntax error, ',' expected [F:\UE4_Projects\CS_TestOne\Source\CS_TestOneMono\CS_TestOneMono.csproj]
obj\Win64\Development Editor\MonoUE4\helpers\InputIniHelpers.g.cs(11,60): error CS1026: ) expected [F:\UE4_Projects\CS_TestOne\Source\CS_TestOneMono\CS_TestOneMono.csproj]
obj\Win64\Development Editor\MonoUE4\helpers\InputIniHelpers.g.cs(11,60): error CS1002: ; expected [F:\UE4_Projects\CS_TestOne\Source\CS_TestOneMono\CS_TestOneMono.csproj]
MonoErrors: New page: Mono Runtime Errors
LogMono: Found assembly UnrealEngine.Runtime.dll at path '../../../Engine/Plugins/MonoUE/Binaries/Win64/MonoEditor/UnrealEngine.Runtime.dll'.


@mhutch I have another question. Is https://github.com/xamarin/UnrealEngine/tree/monoue-4.16 suppose to be 404? I can’t seem to be able to access that at all. I am able to access https://github.com/mono-ue/UnrealEngine just fine.

The link points at the wrong repo. It’s here: https://github.com/mono-ue/UnrealEngine/tree/monoue-4.16

Oops, fixed. Thanks!

Ah, sorry, I accidentally made some of the generated code uncompilable when i was fixing up the license headers for the release. I’ve just pushed a fix.

Hello… I tried twice to download the monoue branch and the operate dependencies package… Followed instructions (which I build the c++ version all the time)…
But during the UE4>My Mac build process get a bunch errors about missing namespace names…
I am using a Mac Pro (10.12.6) with Xcode 8.3.3 and using Visual Studio For Mac (Really old Xamarin/MonoDevelop with a new Microsoft Face)

Here is a listing of errors I get… Any help would be awesome :slight_smile:

Showing Recent Issues
[1216/1654] mac-msbuild.sh UE4_Bindings.sln

MonoUE.Tasks -> /Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Binaries/DotNET/UE4_Build.dll

Consider app.config remapping of assembly “mscorlib, Culture=neutral, PublicKeyToken=b77a5c561934e089” from Version “2.0.0.0” ] to Version “4.0.0.0” [/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/4.6-api/mscorlib.dll] to solve conflict and get rid of warning.

Consider app.config remapping of assembly “System, Culture=neutral, PublicKeyToken=b77a5c561934e089” from Version “2.0.0.0” [/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll] to Version “4.0.0.0” [/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/4.6-api/System.dll] to solve conflict and get rid of warning.

/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): warning MSB3276: Found conflicts between different versions of the same dependent assembly. Please set the “AutoGenerateBindingRedirects” property to true in the project file. For more information, see Enable or disable autogenerated binding redirects | Microsoft Docs. [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Source/Programs/MonoAssemblyProcess/MonoAssemblyProcess.csproj]

MonoAssemblyProcess -> /Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Binaries/DotNET/UE4_Build.exe

/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly “System”. Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoMainDomain/UnrealEngine.MainDomain.csproj]

/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly “System.Core”. Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoMainDomain/UnrealEngine.MainDomain.csproj]

/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly “System.Xml.Linq”. Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoMainDomain/UnrealEngine.MainDomain.csproj]

/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly “Microsoft.CSharp”. Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoMainDomain/UnrealEngine.MainDomain.csproj]

/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly “System.Xml”. Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoMainDomain/UnrealEngine.MainDomain.csproj]

UnrealAgentConnection.cs(6,14): error CS0234: The type or namespace name ‘Net’ does not exist in the namespace ‘System’ (are you missing an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoMainDomain/UnrealEngine.MainDomain.csproj]

UnrealAgentServer.cs(7,14): error CS0234: The type or namespace name ‘Net’ does not exist in the namespace ‘System’ (are you missing an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoMainDomain/UnrealEngine.MainDomain.csproj]

UnrealAgentServer.cs(8,14): error CS0234: The type or namespace name ‘Net’ does not exist in the namespace ‘System’ (are you missing an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoMainDomain/UnrealEngine.MainDomain.csproj]

UnrealAgent.cs(9,14): error CS0234: The type or namespace name ‘Net’ does not exist in the namespace ‘System’ (are you missing an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoMainDomain/UnrealEngine.MainDomain.csproj]

UnrealAgent.cs(67,22): error CS0246: The type or namespace name ‘Process’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoMainDomain/UnrealEngine.MainDomain.csproj]

UnrealAgent.cs(135,49): error CS0246: The type or namespace name ‘TcpClient’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoMainDomain/UnrealEngine.MainDomain.csproj]

UnrealAgentServer.cs(123,28): error CS0246: The type or namespace name ‘Process’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoMainDomain/UnrealEngine.MainDomain.csproj]

UnrealAgentServer.cs(44,9): error CS0246: The type or namespace name ‘TcpListener’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoMainDomain/UnrealEngine.MainDomain.csproj]

UnrealAgentConnection.cs(36,3): error CS0246: The type or namespace name ‘TcpClient’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoMainDomain/UnrealEngine.MainDomain.csproj]

UnrealAgentConnection.cs(45,4): error CS0246: The type or namespace name ‘TcpClient’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoMainDomain/UnrealEngine.MainDomain.csproj]

UnrealAgent.cs(73,13): error CS0246: The type or namespace name ‘Process’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoMainDomain/UnrealEngine.MainDomain.csproj]

UnrealAgent.cs(75,43): error CS0246: The type or namespace name ‘Process’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoMainDomain/UnrealEngine.MainDomain.csproj]

Consider app.config remapping of assembly “System, Culture=neutral, PublicKeyToken=b77a5c561934e089” from Version “2.0.0.0” [/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll] to Version “4.0.0.0” [/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/4.5-api/System.dll] to solve conflict and get rid of warning.

Consider app.config remapping of assembly “mscorlib, Culture=neutral, PublicKeyToken=b77a5c561934e089” from Version “2.0.0.0” ] to Version “4.0.0.0” [/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/4.5-api/mscorlib.dll] to solve conflict and get rid of warning.

/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): warning MSB3276: Found conflicts between different versions of the same dependent assembly. Please set the “AutoGenerateBindingRedirects” property to true in the project file. For more information, see Enable or disable autogenerated binding redirects | Microsoft Docs. [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Source/Programs/MonoGenerateProjects/MonoGenerateProjects.csproj]

MonoGenerateProjects -> /Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Binaries/DotNET/UE4_Build.exe

/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly “System”. Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly “System.Core”. Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly “Microsoft.CSharp”. Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly “System.Xml”. Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

CategoryAttribute.cs(6,14): error CS0234: The type or namespace name ‘Linq’ does not exist in the namespace ‘System’ (are you missing an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

ConstructorHelpers.cs(5,14): error CS0234: The type or namespace name ‘Linq’ does not exist in the namespace ‘System’ (are you missing an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

FunctionFlags.cs(5,14): error CS0234: The type or namespace name ‘Linq’ does not exist in the namespace ‘System’ (are you missing an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Key.cs(6,14): error CS0234: The type or namespace name ‘Linq’ does not exist in the namespace ‘System’ (are you missing an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

LifetimeCondition.cs(5,14): error CS0234: The type or namespace name ‘Linq’ does not exist in the namespace ‘System’ (are you missing an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Quaternion.cs(27,14): error CS0234: The type or namespace name ‘ComponentModel’ does not exist in the namespace ‘System’ (are you missing an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Quaternion.cs(28,14): error CS0234: The type or namespace name ‘Xml’ does not exist in the namespace ‘System’ (are you missing an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Quaterniond.cs(27,14): error CS0234: The type or namespace name ‘ComponentModel’ does not exist in the namespace ‘System’ (are you missing an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Quaterniond.cs(28,14): error CS0234: The type or namespace name ‘Xml’ does not exist in the namespace ‘System’ (are you missing an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Vector3.cs(27,14): error CS0234: The type or namespace name ‘Xml’ does not exist in the namespace ‘System’ (are you missing an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Vector3d.cs(27,14): error CS0234: The type or namespace name ‘Xml’ does not exist in the namespace ‘System’ (are you missing an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Vector3h.cs(29,14): error CS0234: The type or namespace name ‘Xml’ does not exist in the namespace ‘System’ (are you missing an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Vector4.cs(27,14): error CS0234: The type or namespace name ‘Xml’ does not exist in the namespace ‘System’ (are you missing an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Vector4d.cs(27,14): error CS0234: The type or namespace name ‘Xml’ does not exist in the namespace ‘System’ (are you missing an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Vector4h.cs(29,14): error CS0234: The type or namespace name ‘Xml’ does not exist in the namespace ‘System’ (are you missing an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

SharedPtr.cs(6,14): error CS0234: The type or namespace name ‘Linq’ does not exist in the namespace ‘System’ (are you missing an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

FixedSizeArray.cs(6,14): error CS0234: The type or namespace name ‘Linq’ does not exist in the namespace ‘System’ (are you missing an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

StructFlags.cs(5,14): error CS0234: The type or namespace name ‘Linq’ does not exist in the namespace ‘System’ (are you missing an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

UFunctionAttribute.cs(6,14): error CS0234: The type or namespace name ‘Linq’ does not exist in the namespace ‘System’ (are you missing an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

UnrealArray.cs(5,14): error CS0234: The type or namespace name ‘Linq’ does not exist in the namespace ‘System’ (are you missing an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Vector4.cs(971,10): error CS0246: The type or namespace name ‘XmlIgnoreAttribute’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Vector4.cs(971,10): error CS0246: The type or namespace name ‘XmlIgnore’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Vector4.cs(977,10): error CS0246: The type or namespace name ‘XmlIgnoreAttribute’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Vector4.cs(977,10): error CS0246: The type or namespace name ‘XmlIgnore’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Vector3d.cs(1157,10): error CS0246: The type or namespace name ‘XmlIgnoreAttribute’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Vector3d.cs(1157,10): error CS0246: The type or namespace name ‘XmlIgnore’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Vector4h.cs(216,10): error CS0246: The type or namespace name ‘XmlIgnoreAttribute’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Vector4h.cs(216,10): error CS0246: The type or namespace name ‘XmlIgnore’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Vector4h.cs(222,10): error CS0246: The type or namespace name ‘XmlIgnoreAttribute’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Vector4h.cs(222,10): error CS0246: The type or namespace name ‘XmlIgnore’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Vector3.cs(1160,10): error CS0246: The type or namespace name ‘XmlIgnoreAttribute’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Vector3.cs(1160,10): error CS0246: The type or namespace name ‘XmlIgnore’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Vector3h.cs(199,10): error CS0246: The type or namespace name ‘XmlIgnoreAttribute’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Vector3h.cs(199,10): error CS0246: The type or namespace name ‘XmlIgnore’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Vector4d.cs(974,10): error CS0246: The type or namespace name ‘XmlIgnoreAttribute’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Vector4d.cs(974,10): error CS0246: The type or namespace name ‘XmlIgnore’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Vector4d.cs(980,10): error CS0246: The type or namespace name ‘XmlIgnoreAttribute’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Vector4d.cs(980,10): error CS0246: The type or namespace name ‘XmlIgnore’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Quaterniond.cs(81,10): error CS0246: The type or namespace name ‘EditorBrowsableAttribute’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Quaterniond.cs(81,10): error CS0246: The type or namespace name ‘EditorBrowsable’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Quaterniond.cs(82,10): error CS0246: The type or namespace name ‘XmlIgnoreAttribute’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Quaterniond.cs(82,10): error CS0246: The type or namespace name ‘XmlIgnore’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Quaterniond.cs(81,26): error CS0103: The name ‘EditorBrowsableState’ does not exist in the current context [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Quaternion.cs(98,10): error CS0246: The type or namespace name ‘EditorBrowsableAttribute’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Quaternion.cs(98,10): error CS0246: The type or namespace name ‘EditorBrowsable’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Quaternion.cs(99,10): error CS0246: The type or namespace name ‘XmlIgnoreAttribute’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Quaternion.cs(99,10): error CS0246: The type or namespace name ‘XmlIgnore’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Quaternion.cs(98,26): error CS0103: The name ‘EditorBrowsableState’ does not exist in the current context [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Quaternion.cs(110,10): error CS0246: The type or namespace name ‘XmlIgnoreAttribute’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Quaternion.cs(110,10): error CS0246: The type or namespace name ‘XmlIgnore’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Quaterniond.cs(93,10): error CS0246: The type or namespace name ‘XmlIgnoreAttribute’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Quaterniond.cs(93,10): error CS0246: The type or namespace name ‘XmlIgnore’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Quaternion.cs(116,10): error CS0246: The type or namespace name ‘XmlIgnoreAttribute’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Quaternion.cs(116,10): error CS0246: The type or namespace name ‘XmlIgnore’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Quaterniond.cs(99,10): error CS0246: The type or namespace name ‘XmlIgnoreAttribute’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Quaterniond.cs(99,10): error CS0246: The type or namespace name ‘XmlIgnore’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Quaternion.cs(122,10): error CS0246: The type or namespace name ‘XmlIgnoreAttribute’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Quaternion.cs(122,10): error CS0246: The type or namespace name ‘XmlIgnore’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Quaterniond.cs(105,10): error CS0246: The type or namespace name ‘XmlIgnoreAttribute’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Quaterniond.cs(105,10): error CS0246: The type or namespace name ‘XmlIgnore’ could not be found (are you missing a using directive or an assembly reference?) [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

Math/Matrix3.cs(343,21): warning CS3006: Overloaded method ‘Matrix3.Equals(ref Matrix3)’ differing only in ref or out, or in array rank, is not CLS-compliant [/Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Managed/MonoBindings/UnrealEngine.Runtime.csproj]

ERROR: UBT ERROR: Failed to produce item: /Users/Shared/UnrealEngine/Install/MONO_4.16/Engine/Plugins/MonoUE/Binaries/Mac/UE4Editor-MonoRuntime.dylib

Alright, finally got the build to work. Tested with TP_ThirdPersonMono project template.

@mhutch I got a couple of questions?

  1. Can I open the generated C# project in MonoDevelop or Xamarin Studio? I remember that was possible a couple of years ago.
  2. Is there a way to get autocomplete working? If not, where to I find the equivalent C++ to C# binding?
  3. Is the ability to package the project gonna be added soon? The main reason is because the only reliable way of testing inside of Unreal is with a cooked/packaged built. There are too many gotcha/bugs that can slip by when testing inside the Editor.

@MackeyK24 did you unpack the dependencies zip per the Engine/Plugins/MonoUE/README.md? Are there any indications as to why UE4Editor-MonoRuntime.dylib failed to build?

@kelfire

  1. I’m planning to write a Visual Studio extension, since Xamarin Studio isn’t shipped any more. This is super high on my list of priorities. First I want to switch to the new Sdk-style csproj’s as they’re cleaner and easier to support in a VS extension.
  2. You can use Visual Studio. Just delete the <ProjectTypeGuids> element from the csproj and make sure you set the configuration to one that you built (the bindings are built per-configuration).
  3. That’ll likely be the next thing after VS support, debugging, and hot reload.

Yes I did… Was only two folders … Templates with had the TP_ templates and a ‘ThirdParty’ which had a mono folder in it…

But for some reason… on my Mac… The build looks like it CANNOT find any mono stuff…

a bunch of error like this:

error CS0234: The type or namespace name ‘Net’ does not exist in the namespace ‘System’ (are you missing an assembly reference?)

[COLOR=#333333]@[/COLOR]mhutch

I deleted <ProjectTypeGuids> and I was able to open the C# project inside of Visual Studio. I changed the configuration to Development Editor (Win64) and the autocomplete works. The autocomplete is very good. It works for UProperties, functions, and variables. I got one error when trying to build the C# project, it looks like there is an extra ‘dash’. I’ll post the error below.

Edit: Looks like this error occur if I have the Unreal Editor open while compiling.


D:\GitHub\UnrealEngine\Engine\Plugins\MonoUE\MSBuild\MonoUE.Common.targets(62,5): warning MSB3026: Could not copy "obj\Win64\Development Editor\MonoUE4\Test_SevenMono.dll" to "F:\UE4_Projects\Test_Seven\\Binaries\Win64\MonoEditor\Test_SevenMono.dll". Beginning retry 1 in 1000ms. The requested operation cannot be performed on a file with a user-mapped section open.

@kelfire yes, I’ll fix that as part of the hot reload work. the issue is that windows won’t allow the file to be written while the runtime has it loaded and memory mapped. the fix is for the plugin to “shadow copy” game assemblies to a temp directory before loading them.