diff --git a/src/Directory.Build.props b/src/Directory.Build.props index f1050e1113..8455798490 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -2,7 +2,7 @@ CS1591;CS0649 - 1.4.1 + 1.5.0 Json, Testing, Verify Enables simple verification of complex models. diff --git a/src/Verify/ApplyScrubbers.cs b/src/Verify/ApplyScrubbers.cs index 3a44de6cde..f91ca39467 100644 --- a/src/Verify/ApplyScrubbers.cs +++ b/src/Verify/ApplyScrubbers.cs @@ -1,16 +1,19 @@ using System; using System.Collections.Generic; +using System.IO; using Verify; static class ApplyScrubbers { static HashSet currentDirectoryReplacements = new HashSet(); + static string tempPath; static ApplyScrubbers() { currentDirectoryReplacements.Add(CleanPath(AppDomain.CurrentDomain.BaseDirectory)); currentDirectoryReplacements.Add(CleanPath(Environment.CurrentDirectory)); currentDirectoryReplacements.Add(CleanPath(CodeBaseLocation.CurrentDirectory)); + tempPath = CleanPath(Path.GetTempPath()); } public static string Apply(string target, List> scrubbers) @@ -20,6 +23,8 @@ public static string Apply(string target, List> scrubbers) target = target.Replace(replace, "CurrentDirectory"); } + target = target.Replace(tempPath, "TempPath"); + foreach (var scrubber in scrubbers) { target = scrubber(target);