BrighterTools.CodeGenerator
2.0.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet tool install --global BrighterTools.CodeGenerator --version 2.0.0
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
dotnet tool install --local BrighterTools.CodeGenerator --version 2.0.0
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=BrighterTools.CodeGenerator&version=2.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package BrighterTools.CodeGenerator --version 2.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
BrighterTools.CodeGenerator
Code generation tooling for BrighterTools projects, packaged as a dotnet tool.
Projects
BrighterTools.CodeGenerator(console tool)BrighterTools.CodeGenerator.Tests(xUnit tests)
Commands
- Scaffold a consuming repo:
dotnet tool run brightertools-codegenerator -- init - Generate from app-owned config:
dotnet tool run brightertools-codegenerator -- generate --config CodeGeneration/codegen.json - Legacy-compatible invocation:
dotnet tool run brightertools-codegenerator -- --config CodeGeneration/codegen.json
Cross-Platform Workflow
- Relative
--configpaths resolve from the current working directory. - Relative paths inside
codegen.jsonresolve from the folder containing that config file. - Consuming repos should keep a repo-owned
CodeGenerationfolder withpwshentrypoints and thin Windows.batshims. - The generated Windows
.batshims preferpwshand fall back to Windows PowerShell whenpwshis not installed. initscaffolds those starter files for convention-based repos and keepsprojectPath/templatesDirectoryempty for tool-based usage.
Development
- Build:
dotnet build BrighterTools.CodeGenerator.slnx -c Release - Test:
dotnet test BrighterTools.CodeGenerator.slnx -c Release - Pack locally:
PackageToolForNuGet.bat
CI Packaging
- GitHub Actions validates restore, build, and test on Windows, Linux, and macOS.
- Packing still runs on Ubuntu and uploads the
.nupkgand.snupkgartifacts. - The packaged
.nupkgand.snupkgfiles are uploaded as workflow artifacts. - The
publish-toolworkflow is configured for Trusted Publishing with GitHub OIDC, not a stored NuGet API key.
NuGet Sources
- The repo-level
NuGet.configclears inherited package sources and restores fromnuget.org. - This avoids machine-specific feeds such as Telerik affecting restore and pack.
Trusted Publishing Setup
- You must configure Trusted Publishing in
nuget.orgfor this GitHub repository before the publish workflow can push packages. - The workflow already includes the GitHub OIDC permission it needs:
id-token: write. - The workflow uses
NuGet/login@v1to exchange the GitHub OIDC token for a short-lived NuGet API key during the publish job. - No long-lived
NUGET_API_KEYrepository secret is required for the GitHub publishing workflow once Trusted Publishing is configured.
Full setup and consuming-app guidance lives in usage.md.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
v2.0.0 - Cross-platform code generation workflow
Included:
- Added explicit generate and init CLI commands.
- Added scaffolded cross-platform CodeGeneration wrappers for consuming repos.
- Moved cleanup and verification behavior into config-driven repo workflow settings.
- Standardized config-relative path resolution from the codegen.json folder.
Breaking changes:
- Consuming repos should move to the scaffolded PowerShell wrapper workflow for cross-platform support.
- Newly scaffolded configs and scripts follow the v2 workflow conventions.