}
if (!load_embedded_profiler (desc, mname)) {
libname = g_strdup_printf ("mono-profiler-%s", mname);
- if (!load_profiler_from_directory (NULL, libname, desc)) {
- res = FALSE;
#if defined (MONO_ASSEMBLIES)
- res = load_profiler_from_directory (mono_assembly_getrootdir (), libname, desc);
+ res = load_profiler_from_directory (mono_assembly_getrootdir (), libname, desc);
#endif
- if (!res)
- res = load_profiler_from_mono_instalation (libname, desc);
-
- if (!res)
- g_warning ("The '%s' profiler wasn't found in the main executable nor could it be loaded from '%s'.", mname, libname);
- }
+ if (!res)
+ res = load_profiler_from_directory (NULL, libname, desc);
+ if (!res)
+ res = load_profiler_from_mono_instalation (libname, desc);
+ if (!res)
+ g_warning ("The '%s' profiler wasn't found in the main executable nor could it be loaded from '%s'.", mname, libname);
g_free (libname);
}
g_free (mname);
mono_counters_init ();
+ /* Set rootdir before loading config */
+ mono_set_rootdir ();
+
if (enable_profile)
mono_profiler_load (profile_options);
mono_load_coree (argv [i]);
#endif
- /* Set rootdir before loading config */
- mono_set_rootdir ();
-
/* Parse gac loading options before loading assemblies. */
if (mono_compile_aot || action == DO_EXEC || action == DO_DEBUGGER) {
mono_config_parse (config_file);