diff options
author | Zoltan Varga <vargaz@gmail.com> | 2012-05-30 03:34:01 +0400 |
---|---|---|
committer | Zoltan Varga <vargaz@gmail.com> | 2012-05-30 03:34:01 +0400 |
commit | 7871d10add5532dc9cfa484277308b78b8f9ecbe (patch) | |
tree | 75da678c9f75b6b9b697da56feb3a114a30255e6 /mcs | |
parent | 5c5a7fb77888412dcc153e6c93592a010a394bae (diff) |
Avoid loading already loaded assemblies in the remote csharp repl.
Diffstat (limited to 'mcs')
-rw-r--r-- | mcs/tools/csharp/repl.cs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mcs/tools/csharp/repl.cs b/mcs/tools/csharp/repl.cs index f77ebc1bdf9..24a5d2a5ef5 100644 --- a/mcs/tools/csharp/repl.cs +++ b/mcs/tools/csharp/repl.cs @@ -686,8 +686,11 @@ namespace Mono { AppDomain.CurrentDomain.AssemblyLoad += AssemblyLoaded; // Add all currently loaded assemblies - foreach (Assembly a in AppDomain.CurrentDomain.GetAssemblies ()) - evaluator.ReferenceAssembly (a); + foreach (Assembly a in AppDomain.CurrentDomain.GetAssemblies ()) { + // Some assemblies seem to be already loaded, and loading them again causes 'defined multiple times' errors + if (a.GetName ().Name != "mscorlib" && a.GetName ().Name != "System.Core" && a.GetName ().Name != "System") + evaluator.ReferenceAssembly (a); + } RunRepl (s); } finally { |