skills/dotnet-deploy/SKILL.md
Build and deploy .NET applications — ASP.NET Core, version detection, self-contained builds, and Dockerfile patterns. Use when deploying a .NET or C# project, or when a .csproj file is detected.
npx skillsauth add nixopus/agent dotnet-deployInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Project is .NET if a *.csproj file exists in the root.
*.csproj → TargetFramework (e.g. net8.0)global.json → sdk.versiondotnet restoredotnet publish --no-restore -c Release -o out./out/<project_name>.dll or ./out/<project_name>.exe./out/<project_name> or dotnet ./out/<project_name>.dll*.csproj filename (e.g. MyApp.csproj → MyApp)ASPNETCORE_URLS=http://0.0.0.0:${PORT:-3000}
Ensures the app listens on all interfaces.
| Package | Purpose |
|---|---|
| libicu-dev | Internationalization support |
| Signal | Framework |
|---|---|
| Microsoft.AspNetCore.App | ASP.NET Core |
| Microsoft.NET.Sdk.Web | Web SDK |
| Microsoft.NET.Sdk.Worker | Worker service |
| Microsoft.NET.Sdk | Console / class library |
Copy project files first for layer caching:
*.csproj, *.slnglobal.json, nuget.config, Directory.Build.props, Directory.Packages.propssrc/RUN --mount=type=cache,target=/root/.nuget/packages \
dotnet restore
| Stage | Image |
|---|---|
| Build | mcr.microsoft.com/dotnet/sdk:8.0 or mcr.microsoft.com/dotnet/sdk:8.0-alpine |
| Runtime | mcr.microsoft.com/dotnet/aspnet:8.0 or mcr.microsoft.com/dotnet/runtime:8.0 |
Use ASP.NET runtime for web apps; runtime for console/worker.
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /app
COPY *.csproj ./
RUN dotnet restore
COPY . .
RUN dotnet publish --no-restore -c Release -o out
FROM mcr.microsoft.com/dotnet/aspnet:8.0
WORKDIR /app
COPY --from=build /app/out .
ENV ASPNETCORE_URLS=http://0.0.0.0:3000
EXPOSE 3000
ENTRYPOINT ["dotnet", "MyApp.dll"]
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /app
COPY *.sln ./
COPY src/ ./src/
RUN dotnet restore
RUN dotnet publish src/MyApp/MyApp.csproj --no-restore -c Release -o out
FROM mcr.microsoft.com/dotnet/aspnet:8.0
WORKDIR /app
COPY --from=build /app/out .
ENV ASPNETCORE_URLS=http://0.0.0.0:3000
EXPOSE 3000
ENTRYPOINT ["dotnet", "MyApp.dll"]
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /app
COPY *.csproj ./
RUN dotnet restore
COPY . .
RUN dotnet publish --no-restore -c Release -o out -r linux-x64 --self-contained true -p:PublishSingleFile=true
FROM mcr.microsoft.com/dotnet/runtime-deps:8.0
WORKDIR /app
COPY --from=build /app/out .
ENV ASPNETCORE_URLS=http://0.0.0.0:3000
EXPOSE 3000
ENTRYPOINT ["./MyApp"]
tools
Compressed catalog of all Nixopus API operations for the nixopus_api() tool
development
Deploy static file sites — Caddy/nginx serving, Staticfile config, and Dockerfile patterns. Use when deploying a static HTML site with no server-side runtime, or when index.html or a Staticfile is detected at the project root.
devops
Deploy shell script applications — interpreter detection, setup scripts, and Dockerfile patterns. Use when deploying a shell script project, or when start.sh is detected.
development
Self-healing loop for failed deployments — diagnose, fix, redeploy up to 3 attempts, then escalate or rollback. Load when a deployment fails or build errors occur.