Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs
diff options
context:
space:
mode:
authorZoltan Varga <vargaz@gmail.com>2012-05-30 03:34:01 +0400
committerZoltan Varga <vargaz@gmail.com>2012-05-30 03:34:01 +0400
commit7871d10add5532dc9cfa484277308b78b8f9ecbe (patch)
tree75da678c9f75b6b9b697da56feb3a114a30255e6 /mcs
parent5c5a7fb77888412dcc153e6c93592a010a394bae (diff)
Avoid loading already loaded assemblies in the remote csharp repl.
Diffstat (limited to 'mcs')
-rw-r--r--mcs/tools/csharp/repl.cs7
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 {