SpecFlow - Visual Studio Installation



In this chapter, we shall see the process of installation of Visual Studio and project configuration.

Installation

Navigate to the link − https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx

For the Community version of Visual Studio, click on Free download under the Community section.

Visual Studio Installation

An .exe file gets downloaded to our system. Double-click on it.

Visual Studio Downloaded

Visual Studio Installer pop-up comes up. Click on Continue. Download and installation process begins.

Visual Studio Installer

Once installation is done, select the option .NET desktop development. Then click on Install.

Desktop Development

Download and installation of packages get started.

Desktop Packages

Once done, click on Restart.

Desktop Restart

From the start menu, type Visual Studio.

Desktop Type

Click on Visual Studio, the welcome screen appears.

Desktop Welcome Screen

Along with it, Visual Studio pop-up appears. If you do not have an existing

account, click on Not now, may be later link and proceed.

Desktop Pop-up

Select a colour for theme and click on Start Visual Studio.

Desktop Colour

Project Configuration

Once the Visual Studio landing page gets opened, click on Create a new project.

Desktop Configuration

We shall create a new C# class library. Enter class library core in the search box. Choose the option Class Library (.NET Core) and click Next.

Class Library Core

Give a project name and location and then click on Create.

Class Library Location

Code Implementation for Project

using System;
namespace ClassLibrary2 {
   public class Class1 {
      public int Number1 { get; set; }
      public int Number2 { get; set; }
      public int Subtraction() {
         throw new NotImplementedException();
      }
   }
}

To build this solution, go to the Build menu, then select Build Solution.

Build Solution

Build success message gets displayed and we have successfully created a project in Visual Studio.

Advertisements