internal static string GetTestResultsDirectory(string baseDirectory)
        {
            var newCache = TypeSystemService.GetCacheDirectory(baseDirectory, false);

            if (newCache == null)
            {
                newCache = TypeSystemService.GetCacheDirectory(baseDirectory, true);
                var oldDirectory = Path.Combine(baseDirectory, "test-results");
                var newDirectory = Path.Combine(newCache, "test-results");
                try {
                    Directory.CreateDirectory(newDirectory);
                    if (Directory.Exists(oldDirectory))
                    {
                        foreach (string file in Directory.GetFiles(oldDirectory, "*.*"))
                        {
                            File.Copy(file, file.Replace(oldDirectory, newDirectory));
                        }
                    }
                } catch (Exception e) {
                    LoggingService.LogError("Error while copying old test-results", e);
                }
                return(newDirectory);
            }

            return(Path.Combine(newCache, "test-results"));
        }
        static string GetTestResultsDirectory(string baseDirectory)
        {
            var cacheDir   = TypeSystemService.GetCacheDirectory(baseDirectory, true);
            var resultsDir = Path.Combine(cacheDir, "test-results");

            if (!Directory.Exists(resultsDir))
            {
                Directory.CreateDirectory(resultsDir);
            }

            return(resultsDir);
        }