mgcb-editor doesn't work

I’m using Ubuntu 20.04.01. When i try to launch mgcb-editor this error occurs:

Unhandled exception. System.TypeInitializationException: The type initializer for 'MonoGame.Tools.Pipeline.Global' threw an exception.
 ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Diagnostics.StackTrace, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.

File name: 'System.Diagnostics.StackTrace, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'


   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at Eto.Drawing.Bitmap.FromResource(String resourceName, Assembly assembly)
   at MonoGame.Tools.Pipeline.Global..cctor()
   --- End of inner exception stack trace ---
   at MonoGame.Tools.Pipeline.Styles.<>c.<Load>b__9_0(ApplicationHandler h)
   at Eto.Style.<>c__DisplayClass13_0`1.<Add>b__0(THandler w)
   at Eto.DefaultStyleProvider.<>c__DisplayClass9_0`1.<Add>b__0(Object widget)
   at Eto.DefaultStyleProvider.ApplyStyles(Object widget, String style)
   at Eto.DefaultStyleProvider.Eto.IStyleProvider.ApplyStyle(Object widget, String style)
   at Eto.Widget.OnStyleChanged(EventArgs e)
   at Eto.Widget.set_Style(String value)
   at MonoGame.Tools.Pipeline.Program.CommandLineInterface.Run(InvocationContext context, String project)
   at MonoGame.Tools.Pipeline.Utilities.CommandLineParser.<>c__DisplayClass2_1.<.ctor>b__1()
   at MonoGame.Tools.Pipeline.Utilities.CommandLineParser.Invoke(String[] args)
   at MonoGame.Tools.Pipeline.Program.Main(String[] args)

Also VS Code IntellliSense doesn’t work when i run dotnet run i can see the window.

Possible there are any packages like gtk-sharp3 missing?
Maybe too try reset the Intellisense database?

I installed gtk-sharp3 but still same error. VS Code shows this error:

The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. [MonoGameExample]

I changed dotnet sdk to snap version. Now intellisense works but mgcb-editor gives a different error:
Process terminated. Couldn’t find a valid ICU package installed on the system. Set the configuration flag System.Globalization.Invariant to true if you want to run with no globalization support.
at System.Environment.FailFast(System.String)
at System.Globalization.GlobalizationMode.GetGlobalizationInvariantMode()
at System.Globalization.GlobalizationMode…cctor()
at System.Globalization.CultureData.CreateCultureWithInvariantData()
at System.Globalization.CultureData.get_Invariant()
at System.Globalization.CultureInfo…cctor()
at System.Globalization.CultureInfo.get_CurrentCulture()
at System.String.StartsWith(System.String, System.StringComparison)
at System.String.StartsWith(System.String)
at System.CommandLine.Parsing.StringExtensions.RemovePrefix(System.String)
at System.CommandLine.Symbol.AddAlias(System.String)
at System.CommandLine.Symbol…ctor(System.Collections.Generic.IReadOnlyCollection`1<System.String>, System.String)
at System.CommandLine.Command…ctor(System.String, System.String)
at System.CommandLine.RootCommand…ctor(System.String)
at MonoGame.Tools.Pipeline.Utilities.CommandLineParser…ctor(MonoGame.Tools.Pipeline.Utilities.ICommandLineInterface)
at MonoGame.Tools.Pipeline.Program.Main(System.String[])
İptal edildi (çekirdek döküldü)

I seen someone say to add this:
‘’’
<ItemGroup>
<Reference Include=“netstandard” />
</ItemGroup>
‘’’
It can’t find libicu for some reason maybe?
I found this:


10 days ago someone said they did this:
$ export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1

when i applied this export, error changed to this:

Unhandled exception. System.TypeInitializationException: The type initializer for ‘GLib.Object’ threw an exception.
—> System.IO.FileNotFoundException: Could not load file or assembly ‘System.Collections.Specialized, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’. The system cannot find the file specified.

Follow the documentation and everything will work just fine: https://docs.monogame.net/articles/getting_started/1_setting_up_your_development_environment_ubuntu.html

1 Like