<NME> ReferenceFinder.cs
<BEF> using System.Collections.Generic;
using System.Linq;
using Mono.Cecil;
{
    public MethodReference TraceWriteLineMethod;
    public MethodReference StartNewMethod;
    public MethodReference StopMethod;
    public TypeReference StopwatchType;
    public MethodReference StringFormatWithArray;
    public MethodReference ConcatMethod;
    public MethodReference IsRunning;
    public MethodReference Elapsed;
    public MethodReference ElapsedMilliseconds;
    public MethodReference GetMethodFromHandle;
    public MethodReference ObjectConstructorMethod;
    public MethodReference MaxMethod;
    public MethodReference GetTicksMethod;
    public MethodReference UtcNowMethod;
    public TypeReference DateTimeType;
    public TypeReference BooleanType;
    public TypeReference VoidType;

    public void FindReferences()
    {
        if (!TryFindTypeDefinition("System.Diagnostics.Trace", out var traceType))
        AddAssemblyIfExists("System", refTypes);
        AddAssemblyIfExists("mscorlib", refTypes);
        AddAssemblyIfExists("System.Diagnostics.TraceSource", refTypes);
        AddAssemblyIfExists("System.Runtime", refTypes);
        AddAssemblyIfExists("System.Reflection", refTypes);
        AddAssemblyIfExists("netstandard", refTypes);

        var traceType = refTypes.Type("Trace");

        var writeLine = traceType.Method("WriteLine", "String");
        TraceWriteLineMethod = ModuleDefinition.ImportReference(writeLine);
        var methodBaseType = FindTypeDefinition("System.Reflection.MethodBase");
        var methodBase = methodBaseType.Method("GetMethodFromHandle", "RuntimeMethodHandle", "RuntimeTypeHandle");
        GetMethodFromHandle = ModuleDefinition.ImportReference(methodBase);

        var booleanType = FindTypeDefinition("System.Boolean");
        BooleanType = ModuleDefinition.ImportReference(booleanType);

        var voidType = FindTypeDefinition("System.Void");
        VoidType = ModuleDefinition.ImportReference(voidType);

        if (TryFindTypeDefinition("System.Diagnostics.Stopwatch", out var stopwatchType))
        {
            StopwatchType = ModuleDefinition.ImportReference(stopwatchType);
            StartNewMethod = ModuleDefinition.ImportReference(stopwatchType.Method("StartNew"));
            StopMethod = ModuleDefinition.ImportReference(stopwatchType.Method("Stop"));
            Elapsed = ModuleDefinition.ImportReference(stopwatchType.Method("get_Elapsed"));
            ElapsedMilliseconds = ModuleDefinition.ImportReference(stopwatchType.Method("get_ElapsedMilliseconds"));
            IsRunning = ModuleDefinition.ImportReference(stopwatchType.Method("get_IsRunning"));
        }
        else
        {
            // Note: injected stopwatch is not supported for TimeSpan elapsed, should we error or add?
            InjectStopwatchType();
        }

        var formatMethod = TypeSystem.StringDefinition.Method("Format", "String", "Object[]");
        StringFormatWithArray = ModuleDefinition.ImportReference(formatMethod);
        var concatMethod = TypeSystem.StringDefinition.Method("Concat", "Object", "Object", "Object");
        ConcatMethod = ModuleDefinition.ImportReference(concatMethod);
    }
}
<MSG> fall back to Debug

<DFF> @@ -1,3 +1,4 @@
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using Mono.Cecil;
@@ -26,11 +27,21 @@ public void FindReferences()
         AddAssemblyIfExists("System", refTypes);
         AddAssemblyIfExists("mscorlib", refTypes);
         AddAssemblyIfExists("System.Diagnostics.TraceSource", refTypes);
+        AddAssemblyIfExists("System.Diagnostics.Debug", refTypes);
         AddAssemblyIfExists("System.Runtime", refTypes);
         AddAssemblyIfExists("System.Reflection", refTypes);
         AddAssemblyIfExists("netstandard", refTypes);
 
-        var traceType = refTypes.Type("Trace");
+        var traceType = refTypes.FirstOrDefault(x => x.Name == "Trace");
+        if (traceType == null)
+        {
+            traceType = refTypes.FirstOrDefault(x => x.Name == "Debug");
+        }
+
+        if (traceType == null)
+        {
+            throw new WeavingException("Could not find either Trace Or Debug");
+        }
 
         var writeLine = traceType.Method("WriteLine", "String");
         TraceWriteLineMethod = ModuleDefinition.ImportReference(writeLine);

fall back to Debug