lr.Dotnet.AiFixBuildTool 2026.3.24.1735

lr-ai-fix-build

NuGet

AI-powered .NET build fixer using coding agent CLIs (Claude Code, GitHub Copilot, Gemini CLI). Fixes build errors and updates NuGet packages.

Usage

Run it directly with dnx:

dnx -y lr.Dotnet.AiFixBuildTool <command>

Commands

fix-build

Fix build errors using a coding agent CLI. Runs dotnet restore and dotnet build, then uses the agent to diagnose and fix any errors.

dnx -y lr.Dotnet.AiFixBuildTool fix-build
dnx -y lr.Dotnet.AiFixBuildTool fix-build --working-dir /path/to/project

update-packages

Update NuGet packages via lr-nuget-update, then fix any resulting build errors.

dnx -y lr.Dotnet.AiFixBuildTool update-packages
dnx -y lr.Dotnet.AiFixBuildTool update-packages --filter "Microsoft*,Serilog*"
dnx -y lr.Dotnet.AiFixBuildTool update-packages --working-dir /path/to/project

Options

Option Description
--working-dir Target project directory (defaults to current directory)
--agent Coding agent to use: claude, copilot, or gemini. Auto-detected if not specified (prefers claude > copilot > gemini).
--cli-path Path to the coding agent CLI executable (auto-detected if not specified)
--filter Comma-separated glob patterns to filter packages (update-packages only)

How it works

  • fix-build: Restores packages, attempts a build (retries once on first failure), then uses the coding agent to read errors, inspect source files, and apply targeted fixes until the build succeeds.
  • update-packages: Runs dnx -y lr.Dotnet.NugetUpdateTool to update packages (with optional --filter), then runs the fix-build flow to resolve any breaking changes.

Supported agents

The tool auto-detects which coding agent CLI is available, preferring Claude Code > GitHub Copilot > Gemini CLI. Override with --agent:

lr-ai-fix-build fix-build --agent copilot
lr-ai-fix-build fix-build --agent gemini --cli-path /usr/local/bin/gemini

Installation

If you prefer to have it installed globally:

dotnet tool install -g lr.Dotnet.AiFixBuildTool

Usage after installation:

lr-ai-fix-build fix-build
lr-ai-fix-build update-packages --filter "Microsoft*"

This package has no dependencies.

Version Downloads Last updated
2026.3.24.1735 1 03/24/2026
2026.3.24.1719 1 03/24/2026