SuperAPI AI Directory

dotnet-build

General & other

View repository

Updated 10-15 22:16

About this skill

.NET Build Skill (Entry Map)

Goal: Provide accurate build procedures.

Quick Start (Choose One)

  • Build Entire Solution → references/build-solution.md
  • Restore Dependencies Only → references/restore-deps.md

When to Use

  • Compiling .NET code (.csproj, .sln files)
  • Restoring NuGet packages and dependencies
  • Building Debug/Release configurations
  • Generating build artifacts (binaries, assemblies)

Do not use for: testing (dotnet-test), formatting (code-format), or analysis (code-analyze)

Inputs & Outputs

Inputs: target (solution/project/all), configuration (Debug/Release), project_path (default: ./dotnet/PigeonPea.sln)

Outputs: artifact_path (bin/ directory), build_log, exit code (0=success)

Guardrails: Operate only within the ./dotnet directory, and do not commit bin/obj/ directories. Aim for idempotent builds.

Navigation

1. Build Entire Solution → references/build-solution.md

  • First build after cloning, build before testing, generating release artifacts

2. Restore Dependencies Only → references/restore-deps.md

  • Setting up the development environment, fixing missing packages, NuGet troubleshooting

Common Patterns

Quick Build (Debug)

cd ./dotnet
dotnet build PigeonPea.sln

Quick Build (Release)

cd ./dotnet
dotnet build PigeonPea.sln --configuration Release

Restore then Build

cd ./dotnet
dotnet restore PigeonPea.sln
dotnet build PigeonPea.sln --no-restore

Clean 후 Rebuild

cd ./dotnet
dotnet clean PigeonPea.sln
dotnet build PigeonPea.sln

Build a Specific Project

cd ./dotnet
dotnet build console-app/PigeonPea.Console.csproj

Verbose Build for Debugging

cd ./dotnet
dotnet build PigeonPea.sln --verbosity detailed

Troubleshooting

Build failure: Check the error message. For detailed error handling, see references/build-solution.md.

Missing dependencies: dotnet restore. references/restore-deps.md.

NU1301 (service index): Cannot connect to NuGet. Check references/restore-deps.md.

Slow build: --no-restore, -m (parallel processing), or /p:RunAnalyzers=false. See references/build-solution.md.

Stale artifacts: dotnet clean, then rebuild.

Success Indicators

Build succeeded.
    0 Warning(s)
    0 Error(s)

Artifact location: ./dotnet/{ProjectName}/bin/{Configuration}/net9.0/

Integration

After build: dotnet-test (testing), code-analyze (static analysis) Before build: code-format (style fixes)

Related