diff --git a/src/coverlet.core/CoverageTracker.cs b/src/coverlet.core/CoverageTracker.cs index d45ad6dae..2107a7e6e 100644 --- a/src/coverlet.core/CoverageTracker.cs +++ b/src/coverlet.core/CoverageTracker.cs @@ -15,7 +15,6 @@ public static class CoverageTracker static CoverageTracker() { _markers = new Dictionary>(); - AppDomain.CurrentDomain.ProcessExit += new EventHandler(CurrentDomain_ProcessExit); } [ExcludeFromCoverage] @@ -25,13 +24,8 @@ public static void MarkExecuted(string path, string marker) { _markers.TryAdd(path, new List()); _markers[path].Add(marker); + File.WriteAllLines(path, _markers[path]); } } - - public static void CurrentDomain_ProcessExit(object sender, EventArgs e) - { - foreach (var kvp in _markers) - File.WriteAllLines(kvp.Key, kvp.Value); - } } } \ No newline at end of file