Skip to content

CLI project regeneration overwrites reviewed NuGet versions #422

Closed

Description

@HavenDV

Regenerating an existing CLI tool can silently replace its reviewed project configuration and undo dependency updates.

Observed with AutoSDK 0.35.0-preview.2.89: tryAGI/Revocalize#55 changes only the generated CLI project, downgrading MinVer 8.0.0 to 7.0.0 and System.CommandLine 2.0.13 to 2.0.7. The repository's update script deletes the whole CLI directory before calling autosdk cli-project, so even an owner-maintained project is replaced by scaffold defaults.

The generator should offer an explicit way to regenerate command sources while retaining an existing .csproj byte-for-byte (including pinned versions, central-version expressions, owner properties and build metadata). A missing project should still be scaffolded. Keeping this opt-in preserves existing default behavior and avoids partial XML rewrites that lose owner settings. The caller must retain the project file rather than deleting its directory first.

Regression coverage should exercise both existing and missing projects, opt-in and default behavior, preservation of owner settings/versions, and regeneration of changed command sources. Real repository validation still needs the complete dependency graph, vulnerability scan, build and no-cost/native checks before accepting the resulting CLI package.

Activity

  1. HavenDV commented on Oct 20, 2026

    @HavenDV
    CollaboratorAuthor

    Fixed by 3389576 and the successful follow-up CI commit 84392c7. The opt-in cli-project --preserve-project-file keeps an existing csproj byte-for-byte and still creates one when missing; default scaffolding behavior is unchanged. Both explicit acceptance tests pass.

    Revocalize now retains its CLI project during generation and restores the reviewed MinVer 8.0.0 / System.CommandLine 2.0.13 graph in ac4c7895ed2f440e56d6624b926e50546c021bf7. Its build, outdated/vulnerability checks, SDK trim, strict native CLI publication and CI passed: https://github.com/tryAGI/Revocalize/actions/runs/39448673078 .

    Verified the publicly released NuGet tool 0.35.0-preview.2.91+84392c706c regenerates the exact repaired CliRuntime and preserves the reviewed project byte-for-byte. Full generator CI: https://github.com/tryAGI/AutoSDK/actions/runs/39448454171 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions