dotnet-fba
0.5.0-preview
See the version list below for details.
dotnet tool install --global dotnet-fba --version 0.5.0-preview
dotnet new tool-manifest
dotnet tool install --local dotnet-fba --version 0.5.0-preview
#tool dotnet:?package=dotnet-fba&version=0.5.0-preview&prerelease
nuke :add-package dotnet-fba --version 0.5.0-preview
dotnet-fba-tool
File-based app source scaffolding tool for .NET 10.0 and later
Overview
dotnet-fba-tool helps you scaffold a “File‑Based App (FBA)” in a single C# file that can include SDK declarations, project properties, and package references. It generates a runnable template file. You can later convert it to a regular project with dotnet project convert, or keep using it as-is in your build pipeline.
This repository itself is authored in a file-based style (dotnet_fba.cs). After converting, you can dotnet pack to create a .NET Global Tool.
Quick start
Create a one-file app scaffold and run with minimal properties:
dotnet-fba -o ./hello.cs -p TargetFramework=net10.0 -p OutputType=Exe
More examples and options:
- Basic usage and variations: see docs/usage.md
- CLI options reference: see docs/cli-options.md
Run directly from the web
Stream and run without cloning or installing:
curl -sSL -o - https://rkttu.github.io/dotnet-fba-tool/dotnet_fba.cs | dotnet run - -o - | dotnet run -
Details and variations: see docs/streaming.md
Helper scripts
Automate local build/pack and global tool install/update from this repo:
- Install/update:
./scripts/install-local-tool.* - Uninstall:
./scripts/uninstall-local-tool.*
See details: docs/scripts.md
Notes and caveats
- Security: You are executing streamed code. Only run from sources you trust. Consider pinning to a specific commit/tag by hosting a fixed URL.
- PowerShell tip: Use
curl.exe(the native curl) to avoid thecurlalias toInvoke-WebRequestwhich returns objects instead of raw bytes. - Requirements: .NET SDK 10.0 or later with File‑Based App support and internet access for the first stage.
- Persisting output: If you want to keep the generated file, replace the middle
-o -with a path (e.g.,-o ./Program.cs) and then run it separately.
Documentation
- Getting Started (local build/install): docs/getting-started.md
- Usage examples: docs/usage.md
- CLI options: docs/cli-options.md
- Streaming (zero-install): docs/streaming.md
- Generated output reference: docs/generated-output.md
- Helper scripts: docs/scripts.md
- Tips and caveats: docs/tips.md
NuGet tool packaging (summary)
Short version: convert → pack → install from local feed. See docs/getting-started.md for full commands.
Helper scripts for local development
To make local development and testing faster, this repository includes helper scripts that automate the local build, pack, and installation of the tool from the generated local feed. They replicate the manual steps above and add safe uninstall commands.
Install or update the tool from this repo (automated):
- CMD (Windows):
.\scripts\install-local-tool.cmd
- PowerShell (pwsh):
.\scripts\install-local-tool.ps1
- Bash/Zsh (Linux/macOS/WSL):
chmod +x ./scripts/install-local-tool.sh
./scripts/install-local-tool.sh
Uninstall the tool (automated):
- CMD (Windows):
.\scripts\uninstall-local-tool.cmd
- PowerShell (pwsh):
.\scripts\uninstall-local-tool.ps1
- Bash/Zsh (Linux/macOS/WSL):
chmod +x ./scripts/uninstall-local-tool.sh
./scripts/uninstall-local-tool.sh
What the install script does:
- Cleans the
projectsdirectory if present. - Converts the file-based project (
dotnet_fba.cs) to a regular project under./projects. - Runs
dotnet packto create a local.nupkgunder./projects/nupkg. - Installs the global tool from the local feed; if already installed, it attempts an update.
Notes:
- Requirements: .NET SDK 10.0+ and the
dotnet project convertcommand available. - Uninstall scripts are safe to run even if the tool is not installed—they exit without error.
- After installing a global tool, you may need to open a new shell session so your PATH updates are recognized (depending on your environment).
CI/CD
See docs/ci-cd.md for CI workflow and publishing rules.
License
This repository is licensed under the terms in the LICENSE file.
| 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. |
This package has no dependencies.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 0.6.1-preview | 540 | 9/17/2025 | |
| 0.6.0-preview | 532 | 9/17/2025 | |
| 0.5.0-preview | 534 | 9/17/2025 |