Imported from enisn/AbpDevTools (
AGENTS.md). Install upstream withnpx skills add enisn/AbpDevTools. Copyright stays with the author.
AbpDevTools
Verify First
- CI in
.github/workflows/dotnet.ymlonly runsdotnet restoreanddotnet build --no-restore; the test step is commented out. For code changes, rundotnet test tests/AbpDevTools.Tests/AbpDevTools.Tests.csprojlocally. - Focused test pattern:
dotnet test tests/AbpDevTools.Tests/AbpDevTools.Tests.csproj --filter FullyQualifiedName~RunCommand_DiscoveryTests - Use raw
dotnet testfor repo verification. The product commandabpdev testis app behavior and only discovers.sln/.slnxfiles. - There is no separate repo lint/typecheck/codegen pipeline.
dotnet buildanddotnet testare the real checks. - Docs are built with DocFX:
dotnet tool update -g docfxthendocfx docs/docfx.json.docs/docfx.jsonoutputs to the root_sitedirectory.
Build And Pack
- Trust
src/AbpDevTools/AbpDevTools.csprojover the README for target frameworks: Debug builds onlynet10.0; Release packsnet8.0;net9.0;net10.0. - Local dev build:
dotnet build AbpDevTools.sln - Pack the tool exactly like CI/publish does:
dotnet pack ./src/AbpDevTools/AbpDevTools.csproj -c Release --include-symbols --include-source -o ./nupkg pwsh install.ps1is the end-to-end local tool install path: it runspack.ps1, uninstalls the global tool, then reinstallsAbpDevToolsfrom./nupkgwith--prerelease.
Code Structure
src/AbpDevTools/Program.csis the CLI composition root.- New commands are not auto-discovered. After creating a command, add its type to the hard-coded
commandsarray inStartup.BuildServices()or the CLI will never expose it. - Non-command services/config classes use AutoRegisterInject: add
[RegisterTransient]or[RegisterSingleton]and letservices.AutoRegisterFromAbpDevTools()wire them up. tests/AbpDevTools.Testsis the only test project. Tests are unit-style and mostly use temp directories/mocks, so they do not need Docker or real ABP apps. Discovery tests that cover git ignore rules call the realgitCLI, so git must be on PATH.
Config And Discovery Quirks
- Global tool config lives under
%AppData%/abpdevas YAML files such astools-configuration.ymlandreplacements.yml. Legacy JSON config is auto-migrated on read. - Repo/project-local overrides live in
abpdev.yml.PrepareCommandcreates it;RunCommandloads the nearest root file fromWorkingDirectoryor its parents; per-project loads also search ancestor folders viaLocalConfigurationManager. - Do not build new behavior on
RunConfiguration. It is[Obsolete], andRunnableProjectsProviderdeletesrun-configuration.ymlon startup. - Runnable project discovery is now heuristic-based: any
*.csprojwith siblingProgram.csis runnable. Migrate fallback also scansProgram.csand top-level*Module.csfor--migrate-database. runandmigratediscovery drops files thatgit ls-filesdoesn't list, which covers ignored files and nested worktrees such as.claude/worktrees/*; seeGitIgnoreFilter. Outside a git repository, or when git lists no files, every folder is scanned.
Current Baseline
dotnet test tests/AbpDevTools.Tests/AbpDevTools.Tests.csprojcurrently passes, but expect existing warnings: duplicateFluentAssertionsreferences in the test csproj, xUnit version resolution warnings, and many nullable/obsolete warnings in both projects.