dotnet-build
.NET build configuration and error handling. Use when building projects, diagnosing build errors, or configuring build options.
What this skill does
# .NET Build Configuration
## Build Commands
### Basic Build
```bash
# Build solution/project
dotnet build
# Build specific project
dotnet build src/MyApp/MyApp.csproj
# Build with configuration
dotnet build --configuration Release
dotnet build -c Debug
# Clean build (no incremental)
dotnet build --no-incremental
# Build without restoring packages
dotnet build --no-restore
```
### Build Output
```bash
# Specify output directory
dotnet build --output ./artifacts
# Build for specific runtime
dotnet build --runtime win-x64
dotnet build --runtime linux-x64
# Build framework-specific
dotnet build --framework net8.0
```
## Build Configurations
### Debug vs Release
```xml
<!-- Default configurations in .csproj -->
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<DefineConstants>DEBUG;TRACE</DefineConstants>
<Optimize>false</Optimize>
<DebugType>full</DebugType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
</PropertyGroup>
```
### Warnings as Errors
```xml
<!-- Treat all warnings as errors -->
<PropertyGroup>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<!-- Treat specific warnings as errors -->
<PropertyGroup>
<WarningsAsErrors>CS0168;CS0219</WarningsAsErrors>
</PropertyGroup>
<!-- Suppress specific warnings -->
<PropertyGroup>
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup>
```
## Multi-Project Solutions
### Solution Build
```bash
# Build entire solution
dotnet build MySolution.sln
# Build specific projects from solution
dotnet build MySolution.sln --project src/Api
# Parallel build (default)
dotnet build --maxcpucount
# Sequential build
dotnet build --maxcpucount:1
```
### Project Dependencies
```xml
<!-- ProjectReference in .csproj -->
<ItemGroup>
<ProjectReference Include="..\Domain\Domain.csproj" />
<ProjectReference Include="..\Infrastructure\Infrastructure.csproj" />
</ItemGroup>
```
## Build Error Categories
### Compilation Errors (CS)
| Code | Description | Common Fix |
|------|-------------|------------|
| CS0103 | Name does not exist | Check spelling, add using statement |
| CS0246 | Type/namespace not found | Add package reference, add using |
| CS1061 | Member does not exist | Check type, update interface |
| CS0029 | Cannot convert type | Add cast, fix type mismatch |
| CS0120 | Object reference required | Make static or instantiate |
### Project Errors (MSB)
| Code | Description | Common Fix |
|------|-------------|------------|
| MSB3202 | Project file not found | Fix path in ProjectReference |
| MSB4019 | Target file not found | Restore packages |
| MSB3644 | Framework not installed | Install SDK |
| MSB3245 | Reference not resolved | Restore packages, check path |
### NuGet Errors (NU)
| Code | Description | Common Fix |
|------|-------------|------------|
| NU1101 | Package not found | Check package name/source |
| NU1103 | Version not found | Check available versions |
| NU1202 | Incompatible framework | Update package or framework |
| NU1605 | Downgrade detected | Resolve version conflicts |
## Package Restoration
```bash
# Restore packages
dotnet restore
# Restore with specific source
dotnet restore --source https://api.nuget.org/v3/index.json
# Clear NuGet cache
dotnet nuget locals all --clear
# List packages
dotnet list package
dotnet list package --outdated
```
## Build Diagnostics
### Verbose Output
```bash
# Detailed build output
dotnet build --verbosity detailed
dotnet build -v d
# Diagnostic output (most verbose)
dotnet build --verbosity diagnostic
# Minimal output
dotnet build --verbosity quiet
```
### Binary Log
```bash
# Generate binary log for analysis
dotnet build -bl
# View with MSBuild Structured Log Viewer
# Download from: https://msbuildlog.com/
```
## Clean Operations
```bash
# Clean build artifacts
dotnet clean
# Clean specific configuration
dotnet clean --configuration Release
# Force clean (delete bin/obj manually)
rm -rf **/bin **/obj
```
## Common Build Issues
### Framework Mismatch
```xml
<!-- Ensure consistent framework across projects -->
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
```
### Missing SDK
```bash
# Check installed SDKs
dotnet --list-sdks
# Install specific version via global.json
{
"sdk": {
"version": "8.0.100"
}
}
```
### Locked Files
```bash
# Kill processes holding files (Windows)
taskkill /F /IM dotnet.exe
# Kill processes (Linux/Mac)
pkill dotnet
```
See [common-errors.md](common-errors.md) for detailed error resolutions.
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.