Godot: editor/editor_node.cpp:5268 - An EditorPlugin build callback failed

Created on 4 Feb 2020  路  36Comments  路  Source: godotengine/godot

Godot version: 3.2 mono

OS/device including version: Ubuntu 18.04

Issue description: Projects fail to run, error message is editor/editor_node.cpp:5268 - An EditorPlugin build callback failed. This happened on an imported project, and later happened in a blank project as well. On the blank project, I can run it once, then the bug appears. Deleting the .sln file seems to fix the problem, restoring it causes the error to pop up again.

Steps to reproduce: Do not know.

Minimal reproduction project: https://github.com/TZubiri/godot-mcve-bug

Related issues: https://github.com/godotengine/godot/issues/23562 https://github.com/godotengine/godot/issues/29232

bug confirmed editor mono

Most helpful comment

We should find a way to display a warning on startup if the Mono version detected doesn't match the one required by Godot.

All 36 comments

I'm pretty sure .sln files are visual studio files, so they shouldn't be generated on linux, same with .csproj and the Properties folder.

Workaround didn't work on the project somebody shared with me, only in the mvce :/

I have the same issue on OSX.

So I did some diggin and after some time I found a way to fix it! So to fix the problem I looked at the error message and the solution is to download the .NET FRAMEWORK develeper pack for version 4.7.
download here.

Had this problem after installing mono-devel from Ubuntu reps, solved it by installing Mono using this guide:
https://www.mono-project.com/download/stable/#download-lin-ubuntu

Installing mono with apt-get mono-devel solved my issue.

The ideal solution would be to add a check for this dependency and switch to a specific error message that links to any of the following:

Linux: https://www.mono-project.com/download/stable/
Windows: https://visualstudio.microsoft.com/downloads/?q=build+tools

I'd suggest bundling the dependency, but I assume there was a conscious decision not to do so, and I can image sane reasons to do so.

Same issue here, using Windows 10.

Same issue on macOS Catalina.

Changing build to Mono under Editor => Editor Settings => Mono => Builds worked for me on Windows 10 since i have Mono installed

Mono : https://www.mono-project.com/download/stable/

Changing build to Mono under Editor => Editor Settings => Mono => Builds worked for me on Windows 10 since i have Mono installed

Mono : https://www.mono-project.com/download/stable/

Works for me too, thanks!

Same problem here on Ubuntu 19.10
The .sln and .proj files were automatically generated by Godot at some point.
I have to delete them manually for the build to work.

  • I have mono-complete installed
  • There is no mono under Editor Settings => Mono => Builds, only msbuild

Turns out while I had mono-complete installed, the default version in Ubuntu 19.10 is old (5.x).
So had to manually add the repository for the latest mono version: https://www.mono-project.com/download/stable/#download-lin-ubuntu

The project can now build

We should find a way to display a warning on startup if the Mono version detected doesn't match the one required by Godot.

We should find a way to display a warning on startup if the Mono version detected doesn't match the one required by Godot.

It would be nice to implement this as a secondary line of defense. But the main solution would be to install mono in the main install procedure, so in linux it would be marked as a dependency in the .deb package.

Officially distributed Godot doesn't require a specific mono version. It only needs msbuild 15.0 or greater which is included with mono-complete for mono 5.x.
IINW Godot already shows an error about MSBuild not being found.
I'll need more info about this issue. Is there any error in the Builds tab? If not, enable the editor setting Mono > Builds > Print Build Output and copy here the command line output from the Godot editor when building.

Update:
In my case, it was because I had previously been casting Godot's Godot.File.ModeFlags to int (using an earlier Godot/Mono version). I'm assuming I had been casting these for a reason previously, however, it seems the new version does not need to be cast, and removing the cast solved the issue for me. It's possible others' problems are also casting Godot flags (or something similar). Check the build tab for error messages.

Original message:
Same issue.
macOS Catalina 10.15.4
Godot v3.2.1.stable.mono.official
Mono 6.8.0

Error in the build tab:
someProjectFile.cs(21,67): error CS1503: Argument 2: cannot convert from 'int' to 'Godot.File.ModeFlags'

Looks like I was previously using Godot's File library and casting with (int) File.ModeFlags.Read. This is no longer working. Likely, I just need to do something other than this cast.

I had this same issue on windows 10. Solved by installing .NET Framework Developer Pack from https://dotnet.microsoft.com/download/dotnet-framework and then editing the <ProjectName>.csproj file in the root of my project folder to make sure it pointed to the version of .NET Framework that I installed.

Same on Ubuntu 20.04

Worked in a new empty project when I managed to remove the .sln project but in my real project the .sln file is recreated every time before build

editor/editor_node.cpp:5268 - An EditorPlugin build callback failed.

Godot 3.2.1.stable.mono
Mono 6.8.0.105
.csproj .NET 4.7

@akibabu Any error on the build issues panel or the msbuild log? If not any errors in the terminal if you run Godot from there?

This issue hit me again. For existing and new projects and I have no idea what changed.
Deleting the .sln file does not help either.

editor/editor_node.cpp:5268 - An EditorPlugin build callback failed

Mono JIT compiler version 6.8.0.105 (Debian 6.8.0.105+dfsg-2 Wed Feb 26 23:23:50 UTC 2020)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
    TLS:           __thread
    SIGSEGV:       altstack
    Notifications: epoll
    Architecture:  amd64
    Disabled:      none
    Misc:          softdebug 
    Interpreter:   yes
    LLVM:          supported, not enabled.
    Suspend:       hybrid
    GC:            sgen (concurrent by default)

xbuild output:

usr/lib/mono/xbuild/14.0/bin/Microsoft.Common.targets:  warning : TargetFrameworkVersion 'v4.7' not supported by this toolset (ToolsVersion: 14.0).

     1 Warning(s)
     0 Error(s)

Time Elapsed 00:00:00.2843780

Every time I try to build in Godot it generates the .sln file.

Distributor ID: Ubuntu
Description:    Ubuntu 20.04 LTS
Release:        20.04
Codename:       focal

I had to completely purge and re-install mono

 sudo apt-get purge libmono* cli-common mono-runtime 
 sudo apt-get autoremove
 sudo apt-get install mono-complete mono-devel

That fixed it.

On Windows, with Editor Setting->Mono->Builds->Print Build Output switched on, I get the following error messages in the console:

System.IO.FileNotFoundException: Cannot find executable for 'MSBuild (Mono)'. Tried with path: bin\msbuild.bat
  at GodotTools.Build.MsBuildFinder.FindMsBuild () [0x000d8] in <2044463e768c4e5583b7cc0d485c7dca>:0
  at GodotTools.Build.BuildSystem.GetMsBuildPath () [0x00000] in <2044463e768c4e5583b7cc0d485c7dca>:0
  at GodotTools.Build.BuildSystem.LaunchBuild (System.String solution, System.String config, System.String loggerOutputDir, System.Collections.Generic.IEnumerable`1[T] customProperties) [0x0001a] in <2044463e768c4e5583b7cc0d485c7dca>:0
  at GodotTools.Build.BuildSystem.Build (System.String solution, System.String config, System.String loggerOutputDir, System.Collections.Generic.IEnumerable`1[T] customProperties) [0x00000] in <2044463e768c4e5583b7cc0d485c7dca>:0
  at GodotTools.Build.BuildSystem.Build (GodotTools.BuildInfo buildInfo) [0x00018] in <2044463e768c4e5583b7cc0d485c7dca>:0
  at GodotTools.BuildManager.Build (GodotTools.BuildInfo buildInfo) [0x0006c] in <2044463e768c4e5583b7cc0d485c7dca>:0
ERROR: call_build: An EditorPlugin build callback failed.
   At: editor/editor_node.cpp:5268

So it's correctly detecting that it can't find the msbuild file, but the error message is misleading.

After installing the latest Stable Mono release v 6.8.0 I get the following error messages at the console:

Running: "C:\Program Files\Mono\bin\msbuild.bat" "C:/Users/Marcel/Downloads/Godot/Test Mono/Test Mono.sln" /v:normal /t:Build "/p:Configuration=Tools" "/l:GodotTools.BuildLogger.GodotBuildLogger,C:\Program Files\Godot\GodotSharp\Tools\GodotTools.BuildLogger.dll;C:\Users\Marcel\AppData\Roaming/Godot/mono/build_logs\20bf9bb17481a4e075c13d92c0d83ff3_Tools" /p:GodotDefineConstants=\"GODOT_WINDOWS;GODOT_64;\"
Microsoft (R) Build Engine version 16.5.0-ci for Mono
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 10/06/2020 08:59:29.
Project "C:\Users\Marcel\Downloads\Godot\Test Mono\Test Mono.sln" on node 1 (Bu
ild target(s)).
ValidateSolutionConfiguration:
  Building solution configuration "Tools|Any CPU".
Project "C:\Users\Marcel\Downloads\Godot\Test Mono\Test Mono.sln" (1) is buildi
ng "C:\Users\Marcel\Downloads\Godot\Test Mono\Test Mono.csproj" (2) on node 1 (
default targets).
C:\Program Files\Mono\lib\mono\msbuild\15.0\bin\Microsoft.Common.CurrentVersion
.targets(1193,5): error MSB3644: The reference assemblies for .NETFramework,Ver
sion=v4.7 were not found. To resolve this, install the Developer Pack (SDK/Targ
eting Pack) for this framework version or retarget your application. You can do
wnload .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
[C:\Users\Marcel\Downloads\Godot\Test Mono\Test Mono.csproj]
Done Building Project "C:\Users\Marcel\Downloads\Godot\Test Mono\Test Mono.cspr
oj" (default targets) -- FAILED.

Done Building Project "C:\Users\Marcel\Downloads\Godot\Test Mono\Test Mono.sln"
 (Build target(s)) -- FAILED.


Build FAILED.

"C:\Users\Marcel\Downloads\Godot\Test Mono\Test Mono.sln" (Build target) (1) ->
"C:\Users\Marcel\Downloads\Godot\Test Mono\Test Mono.csproj" (default target) (
2) ->
(GetReferenceAssemblyPaths target) ->
  C:\Program Files\Mono\lib\mono\msbuild\15.0\bin\Microsoft.Common.CurrentVersi
on.targets(1193,5): error MSB3644: The reference assemblies for .NETFramework,V
ersion=v4.7 were not found. To resolve this, install the Developer Pack (SDK/Ta
rgeting Pack) for this framework version or retarget your application. You can
download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpack
s [C:\Users\Marcel\Downloads\Godot\Test Mono\Test Mono.csproj]

    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:00.64
ERROR: call_build: An EditorPlugin build callback failed.
   At: editor/editor_node.cpp:5268

So installing the Mono SDK is not a sufficient prerequisite.

Yes, the .NET Framework 4.7 should be installed manually from Windows Update.

Godot 3.2.2 fixes that as it will retrieve the necessary framework version automatically.

Yes, the .NET Framework 4.7 should be installed manually from Windows Update.

As far as I can tell the .NET Framework is not upgraded via Windows Update. It needs to be downloaded and installed separately.
~Edit: It appears as if the Windows Update upgrade of the .NET Framework to v4.7 was skipped. Based on this page (which doesn't mention Windows 10 1909, the November 2019 update) the ".NET Framework 4.8 can be used to run applications built for the .NET Framework 4.0 through 4.7.2." and will be "included with the Windows 10 May 2019 update" which isn't yet available on my PC.~
Edit2: Ignore the previous edit. My PC has now been upgraded to Windows 10 2004, the May 2020 update, and the problem remains. There is definitely an additional requirement to install the required Microsoft .NET Framework 4.7 Targeting Pack to ensure the required assemblies are available.

Godot 3.2.2 fixes that as it will retrieve the necessary framework version automatically.

Unfortunately I can't test it properly with 3.2.2 beta 4, because of #39432. However, in addition to the errors reported in #39432, I get the related error (or it's completely separate, but without a stacktrace :-/) when trying to build the project:

Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object
  at GodotTools.BottomPanel.GetBuildTabFor (GodotTools.BuildInfo buildInfo) [0x00000] in <bf243baa94fe41ccbd98c8bbc3a78900>:0
  at GodotTools.BuildManager.Build (GodotTools.BuildInfo buildInfo) [0x0002d] in <bf243baa94fe41ccbd98c8bbc3a78900>:0
  at GodotTools.BuildManager.BuildProjectBlocking (System.String config, System.Collections.Generic.IEnumerable`1[T] godotDefines) [0x00166] in <bf243baa94fe41ccbd98c8bbc3a78900>:0
  at GodotTools.BuildManager.EditorBuildCallback () [0x000ef] in <bf243baa94fe41ccbd98c8bbc3a78900>:0
  at GodotTools.GodotSharpEditor.Build () [0x00000] in <bf243baa94fe41ccbd98c8bbc3a78900>:0
ERROR: debug_send_unhandled_exception_error: System.NullReferenceException: Object reference not set to an instance of an object
   At: modules/mono/mono_gd/gd_mono_utils.cpp:371
ERROR: call_build: An EditorPlugin build callback failed.
   At: editor/editor_node.cpp:5274

So, I was having this issue on a Linux based OS and the error message wasn't really all that helpful; all it gave me was: editor/editor_node.cpp:5268 - An EditorPlugin build callback failed.

I tried running the engine from a console as suggested in the docs somewhere, and: 00:42:45 Godot_v3.2.1-stable_mono_x11_64 $ System.IO.FileNotFoundException: Cannot find binary for 'MSBuild (Mono)', bingo, I didn't have MSBuild.

Would it be possible to have a more informative error message in case of a missing bin/exec dependency?

It seems we're only displaying that error in stdout and not in the Godot editor. Is that all this issue is about or is there some other problem we need to tackle?

It seems we're only displaying that error in stdout and not in the Godot editor. Is that all this issue is about or is there some other problem we need to tackle?

Displaying the error in the editor would be useful indeed, but I think we should make sure that it's not just in the debugger as a "Too Long; Didn't Read" verbose error, but actually shows a dialog box with the English error description, e.g. when .NETFramework v4.7 is missing:

"The reference assemblies for .NETFramework,Version=v4.7 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks"

The editor/editor_node.cpp:5268 - An EditorPlugin build callback failed error message is also generated for multiple reasons including:

  • An MSBuild is not installed or it cannot be located in the path.
  • Microsoft .NET Framework 4.7 Targeting Pack is not installed.

So just updating the current error message is not enough.

Also, if the required Microsoft .NET Framework targeting pack cannot be included with Godot, this should also be stated as a requirement on the web download page for the Mono version in addition to MSBuild.

@akien-mga I meant the Cannot find binary for 'MSBuild (Mono)' error. The missing .NET Framework error won't be needed anymore since as you said we automatically get it from NuGet in Godot 3.2.2+.

For clarity I've tested this (on a reset Windows 10) with v3.2.2.rc1.mono.official with the following outcomes.

No build tools installed and default Editor > Mono > Builds settings i.e. MSBuild (VS Build Tools) and Print Build Output deselected. In other words what someone downloading and trying Godot Mono version for the first time would experience.

After the Build error popup, the error shows the Mono tab with stating "The build method threw an exception", which, when hovering the mouse over elaborates with "System.IO.FileNotFoundException: Cannot find executable for 'MSBuild (VS Build Tools)':
Build error 2

The console output:

Godot Engine v3.2.2.rc1.mono.official - https://godotengine.org
OpenGL ES 3.0 Renderer: Intel(R) HD Graphics 4600

Mono: Logfile is: C:\Users\Marcel\AppData\Roaming/Godot/mono/mono_logs/2020_06_18 09.43.40 (14696).txt
Editing project: C:/Users/Marcel/Downloads/Godot/Test Mono RC1 (C:::Users::Marcel::Downloads::Godot::Test Mono RC1)
Godot Engine v3.2.2.rc1.mono.official - https://godotengine.org
OpenGL ES 3.0 Renderer: Intel(R) HD Graphics 4600

Mono: Logfile is: C:\Users\Marcel\AppData\Roaming/Godot/mono/mono_logs/2020_06_18 09.43.43 (15120).txt
The system cannot find the path specified.
System.IO.FileNotFoundException: Cannot find executable for 'MSBuild (VS Build Tools)'.
  at GodotTools.Build.MsBuildFinder.FindMsBuild () [0x00099] in <60bd525b7fad47169d8990cee0cd32a5>:0
  at GodotTools.Build.BuildSystem.LaunchBuild (System.String solution, System.Collections.Generic.IEnumerable`1[T] targets, System.String config, System.String loggerOutputDir, System.Collections.Generic.IEnumerable`1[T] customProperties) [0x00000] in <60bd525b7fad47169d8990cee0cd32a5>:0
  at GodotTools.Build.BuildSystem.Build (System.String solution, System.String[] targets, System.String config, System.String loggerOutputDir, System.Collections.Generic.IEnumerable`1[T] customProperties) [0x00000] in <60bd525b7fad47169d8990cee0cd32a5>:0
  at GodotTools.Build.BuildSystem.Build (GodotTools.BuildInfo buildInfo) [0x0001e] in <60bd525b7fad47169d8990cee0cd32a5>:0
  at GodotTools.BuildManager.Build (GodotTools.BuildInfo buildInfo) [0x0006c] in <60bd525b7fad47169d8990cee0cd32a5>:0
ERROR: call_build: An EditorPlugin build callback failed.
   At: editor/editor_node.cpp:5276

With just the Build Tools installed, the project builds and runs fine.

I don't think there needs to be more information and this issue can be closed.

It's worth point out though that when installing the VS Build Tools the NuGet Package mangager is also installed. The Mono MSBuild tools don't include the NuGet Package manager; so it still fails with:

C:\Program Files\Mono\lib\mono\msbuild\15.0\bin\Microsoft.Common.CurrentVersion.targets(1193,5): error MSB3644: The ref
erence assemblies for .NETFramework,Version=v4.7 were not found. To resolve this, install the Developer Pack (SDK/Targe
ting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at
https://aka.ms/msbuild/developerpacks [C:\Users\Marcel\Downloads\Godot\Test Mono RC1\Test Mono RC1.csproj]

I don't think there needs to be more information and this issue can be closed.

Personally, I think neither having the information on a mouse hover tooltip nor relying on console output makes for a good solution. Having something more informative, preferably on the Output tab or a pop up, would be reasonably better, making it easier to any newcomers who just downloaded the engine for the first time and it simply _does't_ work out of the box.

I guess this kind of hiccup that mostly affects first time users are the ones that should have the most informative, clear and accessible error messages.

I'm confused with this issue, there seem to be various different problems here. The nuget related issues may be fixed by #41408. I agree about the usability improvements that need to be made regarding MSBuild output and errors, although it probably should be a separate issue.

As op and many others posted, installing the build tools fixed the problem for them, so, yes, this is about missing dependencies. Still, I'd say the real issue stems from how hard it is to diagnose this, not necessarily from the missing deps themselves. My bet is this issue wouldn't even have been created if there was a clear error pop up.

For windows; install .Net core sdk(64bits), install mono(64bits), install c# plugin and godot tools on vscode, make sure it's checked as global mono as always on vscode c# plugin settings. Add mono/bin folder to environment variables. Create a project, Go to godot -> go to editor settings -> go to Mono -> set external editor as vs code, go to Builds under mono, set DOTNET CLI. Click on script(close the godot editor after script opens), it will open up the script but then bring command palette(CTRL+SHIFT+P) and > Godot tools open workspace with Godot editor. Select godot.exe here. Then you are done! Autocomplete and build works out of the box now

For linux, macos bla bla UNIX systems; install .Net code sdk(64bits), install mono(64bits), install c# plugin on vscode, make sure it's checked as global mono as always on vscode c# plugin settings. Create a project, Go to godot -> go to editor settings -> go to Mono -> set external editor as vs code, go to Builds under mono, set MONO SDK. Click on script. Then you are done! Autocomplete and build works out of the box now

Don't ask me why it doesn't work with mono build on windows in 1st option, it is .Net framework target sdk version error.
The funny thing is vscode's c# plugin uses mono too but you never get that .net framework 4.7.2 error which is insane. Windows is for insane people.

Was this page helpful?
0 / 5 - 0 ratings