Gitlab CI yml file for .Net Winforms application

Sample .gitlab-ci.yml file to build a .Net windows application using CI.

Step 1: Install Gitlab runner on your system. Official guide :

Step 2: Under ‘Settings’ select ‘CI/CD’ and configure runner for your project. Disable the Shared runner and use ‘Specific Runner’ configured in previous step.

Step 3: Create .gitlab-ci.yml at the root of your repository.

Step 4: Add following content to your file with changes as per your need:

Build stage will build the code using msbuild and Deploy will copy it to desired location.

Step 5: Under CI/CD pipeline you can see your build with Artifacts link.