Skip to content
Back to Deployment

Deploying with AppVeyor

Windows-focused CI/CD service with .NET and MSBuild support.

CI/CDIntermediate

Why

AppVeyor provides Windows build environments with pre-installed .NET SDKs, ideal for Windows-only projects. DORA's 2024 State of DevOps report shows elite teams deploy 973x more frequently than low performers.

CI/CD pipelines with automated testing reduce change failure rate to 5-15% versus 40-60% for manual deployments.

When

Windows or .NET projects needing cloud CI without self-hosting Windows runners.

How

# appveyor.yml version: 1.0 image: Visual Studio 2022 build_script: - dotnet build -c Release test_script: - dotnet test -c Release artifacts: - path: '**/*.nupkg' deploy: - provider: NuGet api_key: secure: $NUGET_API_KEY on: branch: main appveyor_repo_tag: true 4. Verify deployment — curl -I https://your-app.example.com 5. Monitor logs — check for errors in first 5 minutes 6. Rollback if needed — revert to previous version

Example

// appveyor.yml — Azure deployment config const deployConfig = { provider: "AzureWebSite", website: "myapp" }; # Deploy to Azure from AppVeyor deploy: - provider: AzureWebSite website: myapp username: $AZURE_USER password: secure: $AZURE_PASS on: branch: main

Common Problems

  • ⚠Build timeout — split tests across jobs
  • ⚠NuGet push fails — check API key and package version
  • ⚠Configuration drift between environments — use infrastructure-as-code (Terraform/Pulumi) to keep dev/staging/prod identical

Best Practices

  • ✓Use build matrix — test across .NET versions
  • ✓Use secure variables — never expose secrets in logs
  • ✓Set up health checks and graceful shutdown — handle SIGTERM to drain in-flight requests before exit

FAQ