anchor.diff:                }
             }
           }
  -```
  -
  -- Add xunit tests.
  -
  -  **tests.cs**
  -
  -  ```
  +
  +- Add xunit tests (tests.cs)
  +
         using Xunit;
  +
         namespace MyFirstDotNetCoreTests
  -  {
  -      public class Class1
         {
  -          [Fact]
  -          public void PassingTest()
  +          public class Class1
             {
  -              Assert.Equal(4, Add(2, 2));
  -          }
  -          int Add(int x, int y)
  -          {
  -              return x + y;
  +              [Fact]
  +              public void PassingTest()
  +              {
  +                  Assert.Equal(4, Add(2, 2));
  +              }
  +              int Add(int x, int y)
  +              {
  +                  return x + y;
  +              }
             }
         }
  -  }
  -  ```
  +
   
   - Now the build, test, package cmds should work. Test and commit and push that to origin.
   
  -  ``` git add -A
  -  git commit -m 'initial hello world app'
  -  git push origin master ```
  +      git add -A
  +      git commit -m 'initial hello world app'
  +      git push origin master
  +
  +<a name="gocd_setup"></a>
   
   ### GoCD Setup
   
  -**Note:** *For windows users I would suggest a simple file path without spaces. I’ll use C:\demo\GoCD\Server and C:\demo\GoCD\Agent for the install and host it on localhost.*
  +**Note:** *For windows users I would suggest a simple file path without spaces. I'll use C:\demo\GoCD\Server and C:\demo\GoCD\Agent for the install and host it on localhost.*
   
   Getting up and running with GoCD is simple. [Download](https://go.cd/download) the server and agent and run the installers. Once it is running your GoCD server should be available at **http://localhost:8153** or **http://your-server-installation-hostname:8153**. Verify the server and agents are working by visiting the site and checking the agents tab.
   
   Now that the test environment is setup we can start adding a pipeline.
   
  +<a name="gocd_pipelines"></a>
  +
   ### GoCD Pipeline
   
  -Initial setup of the “HwPackagePipeline” pipeline which will contain the stage/job/tasks to do the build, test, and package.
  +Initial setup of the "HwPackagePipeline" pipeline which will contain the stage/job/tasks to do the build, test, and package.
   <figure>
     <img src="/assets/images/blog/dotnet-core-gocd/pipeline.png" alt="Pipeline" />
   </figure>
   
   
  -The second page is how you setup the material in GoCD. Here I’ve added my git repo endpoint and tested the connection.
  +The second page is how you setup the material in GoCD. Here I've added my git repo endpoint and tested the connection.
   <figure>
     <img src="/assets/images/blog/dotnet-core-gocd/pipeline-material.png" alt="Pipeline Material" />
   </figure>
   
  -The third page sets up the stage/job. I’ve used the custom build.cmd I created in the setup.
  +The third page sets up the stage/job. I've used the custom build.cmd I created in the setup.
   <figure>
     <img src="/assets/images/blog/dotnet-core-gocd/pipeline-stage-job.png" alt="Pipeline Stage Job" />
   </figure>
  
positive.code:   <img src="/assets/images/blog/dotnet-core-gocd/value-stream-map.png" alt="Value Stream Map" />
  </figure>
  
  Now we can setup a task that fetches the artifacts from the first pipeline and another task to deploy. Here is what setting up a fetch task would look like. The “pkg” folder name came from the artifacts configuration from the first pipeline.
  <figure>
    <img src="/assets/images/blog/dotnet-core-gocd/fetch_artifacts.png" alt="Fetch Artifacts" />
  </figure>
  
  Now if we trigger the first pipeline again and manually trigger the second one we can see the agent was able to fetch the build output from the first pipeline.
  
  ```
    21:31:26.919 [go] Start to execute task: .
    21:31:26.920 [go] Fetching artifact [pkg] from [hwPackagePipeline/8/defaultStage/1/defaultJob]
    21:31:32.017 [go] Saved artifact to [pipelines\hwDeployPipeline] after verifying the integrity of its contents.
    21:31:32.052 [go] Current job status: passed. ```
  
    <figure>
      <img src="/assets/images/blog/dotnet-core-gocd/agent-pkg.png" alt="Agent Pkg" />
    </figure>
  
  ### Review
  
  GoCD has a very good model and abstraction for how to build deployment pipelines. For example, when working on a task like packaging you don’t need to worry about anything else. It leads you to using smaller focused scripts in the right places. Also, the concept of pipelines as a material give a powerful way to break up your deployment process. In my example I used another pipeline, setup with an initial task to wait for manual approval. Then after approval a fetch task runs which copies the artifacts from the build of the first pipeline, which then can be used for deployment.
  
  <style type="text/css">
  .float-image {
    max-width: 25%;
  }
  
  .float-image img {
    max-width: 100%;
  }
  
  .float-image img.pad-right {
    padding-right: 10px;
  }
  
  .float-image img.pad-left {
    padding-left: 10px;
  }
  
  .float-article {
    max-width: 75%;
  }
  
  .float-left {
    float: left;
  }
  
  .float-right {
    float: right;
  }
  
  .clear {
    clear: both;
  }
  
  @media (max-width: 699px) {
    .float-left, .float-right {
      float: none;
    }
  
    .float-image {
      max-width: 100%;
    }
  
    .float-article {
      max-width: 100%;
    }
  }
  </style>
  
negative.code: title_tag_of_header: ".NET Core and GoCD | GoCD Blog"
  meta_description: "GoCD is a great way to learn the concepts and abstractions to help model your delivery pipeline and work towards improving it. This post documents setting up a .NET core project in GoCD in a minimal way for demo purposes."
  meta_keywords: "GoCD, continuous delivery, goforcd, open source, software, contribute to open source, agile continuous delivery, code contribution, Go, dotnet, .NET, .NET core, pipeline"
  ---
  
  [This post originally appeared on [Jason Rowe's site](http://jasonrowe.com/2016/06/26/asp-net-core-gocd/) and is reproduced with permission]
  
  I've been reading up on continuous delivery and the GoCD tool is a great way to learn the concepts and abstractions to help model your delivery pipeline and work towards improving it.
  
  This post documents setting up a .NET core project in GoCD in a minimal way for demo purposes. I cover setting up a hello world app and simple scripts to build, test, and package. Then I will create a pipeline in GoCD to build our site and run unit tests. Finally I'll show how to add additional pipelines for manual acceptance tests and deployment.
  
  If you want to know about my environment and .NET core project for this demo you can read the next section [Demo Environment Setup](#demo_env). If you want to just jump ahead to the GoCD part you can scroll down to the [GoCD Setup](#gocd_setup) or [GoCD Pipelines](#gocd_pipelines) sections.
  
  <a name="demo_env"></a>
  
  ## Demo Environment Setup
  
  ### Demo Environment
  
  For this post I'll be using the following file structure:
  
  Where I keep my development git repo.
  
  