watchex logo

watchex francWhite

Use this command to install watchex:
winget install --id=francWhite.watchex -e

Watch and update non-compiled files of a .csproj project at runtime

Watchex is a tool designed to automatically evaluate and update non-compiled files of a .csproj project at runtime. It monitors files marked with CopyToOutputDirectory attributes ("Always" or "PreserveNewest") and ensures they are copied to the output directory whenever changes occur, eliminating the need for manual rebuilds after updates to content files like translations or configurations.

Key Features:

  • Automatic evaluation of all relevant files in the project and its dependencies.
  • Real-time monitoring of file changes for immediate updates.
  • Compatibility with existing .NET projects and their structure.
  • Support for wildcard paths in dependencies, such as translations***.json.
  • Silent operation with optional verbose logging for debugging purposes.

Audience & Benefit:
Ideal for developers working on complex .NET applications where content files are stored in dependencies or require frequent updates without rebuilds. Watchex streamlines the development process by automatically managing file updates, saving time and reducing manual effort.

Watchex can be installed via winget using the command winget install francWhite.watchex.

README

logo

watchex

CI GitHub release licence

Evaluates all files in a given .csproj file, including its dependencies, which are marked as CopyToOutputDirectory "Always" or "PreserveNewest" and thus would be copied to the output directory during the build process. These files are then observed and if any changes are detected, they are copied to the output directory. This avoids having to rebuild the project after changes in content files like translations or non standard configurations.

Why not just use dotnet watch? Even though dotnet watch is a great tool, it has its limitations. If you have some non-compiled files in a dependency which are included with a wildcard like translations\**\*.json, dotnet watch will not detect changes in these files because their paths are evaluated incorrectly; it will look for them in the startup project directory instead of the dependency in question.

Table of Contents

Installation

Install using winget

winget install francWhite.watchex

Install manually

Download the latest release from the releases page, extract the archive to a folder of your choice and add said folder to your PATH environment variable.

Usage

USAGE:
    watchex [OPTIONS]

OPTIONS:
    -h, --help                 Prints help information
    -v, --verbose              Prints verbose log output
    -V, --version              Prints version information
    -p, --project     Path to the project file. Defaults to the first *.csproj file found in the current directory

License

Distributed under the MIT license

Versions
1.0.4
1.0.2
Website