Skip to content

A powerful .NET configuration comparison tool that helps developers and DevOps engineers easily compare and sync config files across environments. Features visual diff comparisons, encrypted string handling, bulk folder comparisons, and automatic backups.

Notifications You must be signed in to change notification settings

davesienkowski/Config-Compare

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Config Compare

A powerful .NET-based configuration comparison tool designed to simplify the process of comparing and synchronizing configuration files across different environments. This tool is particularly useful for DevOps engineers, system administrators, and developers who need to manage multiple configuration files across development, staging, and production environments.

Config Compare provides an intuitive GUI that makes it easy to identify differences between configuration files, with special handling for sensitive data like encrypted connection strings. The tool supports both single-file comparisons and bulk folder comparisons, making it versatile for both individual file updates and large-scale configuration management.

Key highlights:

  • 🔍 Visual diff comparison with color-coded changes
  • 📁 Support for both single file and folder comparison modes
  • 🔒 Smart handling of encrypted sections and sensitive data
  • 💾 Automatic backup creation before applying changes
  • 🔄 Bulk comparison of multiple configuration files
  • ⚙️ Customizable ignore patterns for environment-specific sections

Features

  • Compare configuration files across different environments
  • Support for multiple configuration file formats
  • Visual comparison of differences with color-coding
  • Ability to ignore specific XML sections (like encrypted connection strings)
  • Support for both single file and folder comparison modes
  • Automatic backup creation before applying changes
  • Debug and Release builds available

Project Structure

Config Compare/
├── bin/              # Compiled output files
│   ├── Debug/        # Debug build outputs
│   └── Release/      # Release build outputs
├── obj/              # Intermediate build files
└── src/              # Source code files

Building the Project

Prerequisites

  • Visual Studio 2019 or later
  • .NET 6.0 or later

Build Instructions

  1. Open the solution in Visual Studio
  2. Select desired build configuration (Debug/Release)
  3. Build the solution (F6 or Build > Build Solution)

Usage

Single File Mode

  1. Select source and target configuration files using the Browse buttons
  2. Add any XML patterns to ignore (e.g., encrypted connection strings)
  3. Click 'Compare' to see differences:
    • Green text indicates lines added in the target
    • Red text indicates lines removed from source
    • Black text shows unchanged lines
  4. Review the differences
  5. Click 'Apply Changes' to update the target file (backup is automatically created)

Folder Mode

  1. Check the "Folder Mode" checkbox
  2. Select source and target folders containing config files
  3. Click 'Compare' to analyze all matching config files:
    • Each file gets its own tab
    • Summary tab shows an overview of all files
    • Color coding follows the same pattern as single file mode
  4. Review changes in each tab
  5. Click 'Apply Changes' to update all target files (backups are created in a timestamped folder)

Ignore Patterns

  • Use the ignore patterns feature to exclude specific XML sections from comparison
  • Particularly useful for:
    • Encrypted connection strings
    • Machine-specific settings
    • Environment-specific configurations
  • Ignored sections are preserved when applying changes

Development

  • Debug configuration: Use for development and testing
  • Release configuration: Use for production deployment

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

MIT License

Copyright (c) 2024

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

A powerful .NET configuration comparison tool that helps developers and DevOps engineers easily compare and sync config files across environments. Features visual diff comparisons, encrypted string handling, bulk folder comparisons, and automatic backups.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages