diff --git a/mono/mini/debugger-agent.c b/mono/mini/debugger-agent.c index 72d3e5dd9decf..314d5faaf1952 100644 --- a/mono/mini/debugger-agent.c +++ b/mono/mini/debugger-agent.c @@ -5754,7 +5754,12 @@ assembly_commands (int command, guint8 *p, guint8 *end, Buffer *buf) gboolean ignorecase = decode_byte (p, &p, end); MonoTypeNameParse info; MonoType *t; - gboolean type_resolve; + gboolean type_resolve, res; + MonoDomain *d = mono_domain_get (); + + /* This is needed to be able to find referenced assemblies */ + res = mono_domain_set (domain, FALSE); + g_assert (res); if (!mono_reflection_parse_type (s, &info)) { t = NULL; @@ -5767,6 +5772,8 @@ assembly_commands (int command, guint8 *p, guint8 *end, Buffer *buf) mono_reflection_free_type_info (&info); g_free (s); + mono_domain_set (d, TRUE); + break; } case CMD_ASSEMBLY_GET_NAME: {