In Assembly:
[mono.git] / mcs / class / corlib / System.Reflection.Emit / ModuleBuilder.cs
index d9aadbd9cb384823ab550fb969a168221da73ae4..672be8b6b6129c6830d81650b440bb8dc32d7280 100644 (file)
@@ -101,6 +101,9 @@ namespace System.Reflection.Emit {
                        }
 
                        if (emitSymbolInfo) {
+#if NET_2_1 && !MONOTOUCH
+                               symbolWriter = new Mono.CompilerServices.SymbolWriter.SymbolWriterImpl (this);
+#else
                                Assembly asm = Assembly.LoadWithPartialName ("Mono.CompilerServices.SymbolWriter");
                                if (asm == null)
                                        throw new ExecutionEngineException ("The assembly for default symbol writer cannot be loaded");
@@ -110,6 +113,7 @@ namespace System.Reflection.Emit {
                                        throw new ExecutionEngineException ("The type that implements the default symbol writer interface cannot be found");
 
                                symbolWriter = (ISymbolWriter) Activator.CreateInstance (t, new object[] { this });
+#endif
                                string fileName = fqname;
                                if (assemblyb.AssemblyDir != null)
                                        fileName = Path.Combine (assemblyb.AssemblyDir, fileName);