private bool AreEqual(TeamSharperSettings teamSharperSettings, DotSettings dotSettings)
        {
            // We require the absolute path to be our exact dummy to enshure constistency:
            if (dotSettings.Layers.Any(x => !x.AbsolutePath.Equals(absolutePathDummy, StringComparison.Ordinal)))
            {
                return false;
            }

            var absoluteTeamSettingsLayersPaths = teamSharperSettings.Layers
                .OrderBy(x => x.RelativePriority)
                .Select(x => x.RelativePath)
                .Select(x => PathHelper.MakeFilePathAbsoluteToDirectory(x, teamSharperSettings.FilePath))
                .Select(x => x.ToLowerInvariant());

            var absoluteDotSettingsLayersPaths = dotSettings.Layers
                .OrderBy(x => x.RelativePriority)
                .Select(x => x.RelativePath)
                .Select(x => PathHelper.MakeFilePathAbsoluteToDirectory(x, dotSettings.FilePath))
                .Select(x => x.ToLowerInvariant());

            return absoluteTeamSettingsLayersPaths.SequenceEqual(absoluteDotSettingsLayersPaths);
        }
        internal void AdjustPathsInDotSettings(DotSettings dotSettings, TeamSharperSettings teamSharperSettings)
        {
            dotSettings.Layers.Clear();
            foreach (TeamSharperSettingsLayer teamSharperSettingsLayer in teamSharperSettings.Layers.OrderBy(x => x.RelativePriority))
            {
                string layerReferenceAbsolute = PathHelper.MakeFilePathAbsoluteToDirectory(teamSharperSettingsLayer.RelativePath, Path.GetDirectoryName(teamSharperSettings.FilePath));
                string layerReferenceRelativeToSolution = PathHelper.MakeFilePathRelativeToDirectory(layerReferenceAbsolute, dotSettings.FilePath);

                dotSettings.Layers.Add(new DotSettingsLayer
                {
                    Id = teamSharperSettingsLayer.Id,
                    AbsolutePath = absolutePathDummy,
                    RelativePriority = teamSharperSettingsLayer.RelativePriority,
                    RelativePath = layerReferenceRelativeToSolution
                });
            }
        }
        private void UpdateDotSettings(DotSettings dotSettings, TeamSharperSettings teamSharperSettings)
        {
            AdjustPathsInDotSettings(dotSettings, teamSharperSettings);

            // Finally, save the settings:
            this.dotSettingsSerializer.Save(dotSettings);
        }