Simple C# Web Server

Startup Steps

  • Open a terminal and change to the folder containing the project. Specifically, where the .sln file is

Build the app

  • dotnet build

Starting the server

  • dotnet run --project basic-web-app

Testing

  • Run the tests
    • dotnet test

C# AWS codepipeline deployment

Foreword

This document will focus on following the aws tutorial as closely as possible while modifying the information to relate to a C#/.NET This guide will use the following information...

How to Deploy a C# App with AWS Codepipeline

  1. Create an AWS ElasticBeanstalk environment. (This will take a several minutes.) envStep1 HERE
  2. Fork the C# repository to your own account that will be able to commit changes to the repository. PictureOfForking HERE
  3. Verify that the application has a buildspec.yml file that contains the following at the root level... buildspec.yml
version: 0.2

phases:
  install:
    runtime-versions:
       dotnet: 2.2
  build:
    commands:
      - dotnet restore basic-web-app/basic-web-app.csproj
      - dotnet build basic-web-app/basic-web-app.csproj
      - dotnet publish basic-web-app/basic-web-app.csproj -o site
artifacts:
  files:
    - basic-web-app/site/**/*
    - basic-web-app/site/aws-windows-deployment-manifest.json

Note: The buildspec.yml will be required to include the phases with the runtime version.

  1. Start creating the codepipeline...
  • Create your pipeline Start series of instructions here step 3b

  • Connect with your GitHub repository step 3c step 3c-2

  • Set up the build settings yml

  • Success! success