Skip to content

Commit 0606ba7

Browse files
committed
Merge pull request #80212 from raulsntos/dotnet/check_api_assemblies_dir_exists
Show alert if .NET assemblies dir does not exist
2 parents d191a2f + ef0e279 commit 0606ba7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

modules/mono/mono_gd/gd_mono.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,12 @@ void GDMono::initialize() {
376376

377377
godot_plugins_initialize_fn godot_plugins_initialize = nullptr;
378378

379+
// Check that the .NET assemblies directory exists before trying to use it.
380+
if (!DirAccess::exists(GodotSharpDirs::get_api_assemblies_dir())) {
381+
OS::get_singleton()->alert(vformat(RTR("Unable to find the .NET assemblies directory.\nMake sure the '%s' directory exists and contains the .NET assemblies."), GodotSharpDirs::get_api_assemblies_dir()), RTR(".NET assemblies not found"));
382+
ERR_FAIL_MSG(".NET: Assemblies not found");
383+
}
384+
379385
if (!load_hostfxr(hostfxr_dll_handle)) {
380386
#if !defined(TOOLS_ENABLED)
381387
godot_plugins_initialize = try_load_native_aot_library(hostfxr_dll_handle);

0 commit comments

Comments
 (0)