with one click
csharp-dotnet
// Bootstrap C# .NET projects with modern tooling. Use when creating .NET applications, Web APIs, console apps, Blazor apps, or when the user wants to set up a C# development environment.
// Bootstrap C# .NET projects with modern tooling. Use when creating .NET applications, Web APIs, console apps, Blazor apps, or when the user wants to set up a C# development environment.
Build full-stack React applications with TanStack Start, React Query, shadcn/ui, and Tailwind CSS v4. Use when working on projects created with create-tanstack-start-shadcn, or when the user needs help with TanStack Start patterns, server functions, React Query integration, or shadcn/ui components.
Bootstrap new projects with modern tech stacks. Use when creating new applications, setting up projects, initializing codebases, or when the user mentions project setup, scaffolding, or bootstrapping. Supports TanStack Start + shadcn (via npx create-tanstack-start-shadcn), Rust, Tauri, TanStack Router, Python, and C# .NET projects.
Bootstrap Python projects with virtual environments and modern tooling. Use when creating Python applications, scripts, APIs, data science projects, or when the user wants a properly configured Python development environment.
Bootstrap Rust projects with Cargo. Use when creating Rust applications, CLI tools, libraries, or when the user wants to set up a new Rust codebase with best practices.
Bootstrap React projects with TanStack Router for type-safe file-based routing. Use when creating React SPAs, modern web applications with routing, or when the user wants type-safe navigation in React.
Bootstrap Tauri desktop applications with Rust backend and web frontend. Use when creating cross-platform desktop apps, Electron alternatives, or when the user wants a native desktop application with web technologies.
| name | csharp-dotnet |
| description | Bootstrap C# .NET projects with modern tooling. Use when creating .NET applications, Web APIs, console apps, Blazor apps, or when the user wants to set up a C# development environment. |
Creates production-ready .NET 8+ projects with modern C# features and best practices.
# Check .NET SDK (8.0+ recommended)
dotnet --version
dotnet --list-sdks
Linux (Ubuntu/Debian):
wget https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
sudo apt-get update
sudo apt-get install -y dotnet-sdk-8.0
macOS:
brew install --cask dotnet-sdk
| Template | Command | Description |
|---|---|---|
| Console App | dotnet new console | Command-line application |
| Web API | dotnet new webapi | REST API with controllers |
| Minimal API | dotnet new web | Lightweight HTTP API |
| Blazor Server | dotnet new blazorserver | Server-side Blazor app |
| Blazor WebAssembly | dotnet new blazorwasm | Client-side Blazor app |
| Class Library | dotnet new classlib | Reusable library |
| xUnit Tests | dotnet new xunit | Unit test project |
| Worker Service | dotnet new worker | Background service |
dotnet new console -n MyApp -o MyApp
cd MyApp
dotnet new web -n MyApi -o MyApi
cd MyApi
dotnet new sln -n MySolution
dotnet new web -n MyApi -o src/MyApi
dotnet new classlib -n MyCore -o src/MyCore
dotnet new xunit -n MyTests -o tests/MyTests
dotnet sln add src/MyApi src/MyCore tests/MyTests
dotnet add src/MyApi reference src/MyCore
dotnet add tests/MyTests reference src/MyCore
MySolution/
āāā MySolution.sln
āāā src/
ā āāā MyApi/
ā ā āāā MyApi.csproj
ā ā āāā Program.cs
ā āāā MyCore/
ā āāā MyCore.csproj
āāā tests/
ā āāā MyTests/
ā āāā MyTests.csproj
āāā .editorconfig
āāā Directory.Build.props
āāā Directory.Packages.props
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AnalysisLevel>latest-recommended</AnalysisLevel>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>
</Project>
Create at solution root:
<Project>
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AnalysisLevel>latest-recommended</AnalysisLevel>
</PropertyGroup>
</Project>
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
var app = builder.Build();
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}
app.MapGet("/", () => "Hello World!");
app.MapGet("/items/{id}", (int id) => new Item(id, $"Item {id}"));
app.MapPost("/items", (Item item) => Results.Created($"/items/{item.Id}", item));
app.Run();
record Item(int Id, string Name);
dotnet add package Serilog.AspNetCore
dotnet add package FluentValidation.AspNetCore
dotnet add package Microsoft.EntityFrameworkCore.SqlServer
dotnet add package xunit
dotnet add package Moq
dotnet add package FluentAssertions
dotnet restore
dotnet build
dotnet run
dotnet watch run # Hot reload
dotnet test
dotnet format
dotnet publish -c Release -o ./publish
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- run: dotnet restore
- run: dotnet build --no-restore -c Release
- run: dotnet test --no-build -c Release