Beginners

A beginner's guide on how to get started with Visual Studio

A beginner's guide on how to get started with Visual Studio

The first version of Microsoft Visual Studio was released in 1998. Currently, the latest offering is named Visual Studio 2017 and contains a ton of features. It has come a long way since it was released in 1998. Well, lets just quickly dive in on how a beginner can get started with VS. So, first of all, you will need to decide if you are gonna use an online installer or get it offline first. This is strangely complicated. Due to the presence of third-party components like Android Emulator and iOS SDK, etc. in the package, Microsoft cannot directly host the offline ISO images as it used to until VS 2015. Hence, there are two different ways to download the software depending upon if you want an offline or an online installer. Let us just go through both of them one by one.

How to install Visual Studio

Offline Method

Getting the right edition

First of all, you need to make sure what edition of Microsoft Visual Studio you actually want to download. Then, you will have to need to get the suitable web installer for that particular edition. The following links are for the web installer of your desired edition of VS 2017.

Getting all the files for an offline cache

This area is slightly tricky. Here, you will have first to judge what development components you need to download. There is a separate command (yes! command) for .NET web and desktop development packages. A separate one for .NET Office Development and accordingly more.

Let us just get started for each component. I am saying this; you need not get all the components. Get just those that matter to you.

First, open Command Prompt with Administrator Rights.

Then, Navigate to the location where the installer that you just downloaded is stored.

Now, start executing the following command line instructions as per your need.

vs_community.exe --layout c:\vs2017layout --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NetWeb --add Component.GitHub.VisualStudio --includeOptional --lang en-US
vs_community.exe --layout c:\vs2017layout --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.Office --includeOptional --lang en-US
vs_community.exe --layout c:\vs2017layout --add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended --lang en-US
vs_community.exe --layout c:\vs2017layout --lang en-US 

If you want to not use English as the language for the software, just swap en-US in the commands above with your desired language.

Installing Visual Studio from the downloaded cache

Just in case you wish to ensure that you install only those files that you have downloaded, you can run this command line instruction to verify.

vs_community.exe --layout c:\vs2017layout --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NetWeb --add Component.GitHub.VisualStudio --includeOptional --lang en-US

Now, finally to install VS from the downloaded files, run this command line instruction.

c:\vs2017layout\vs_community.exe --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NetWeb --add Component.GitHub.VisualStudio --includeOptional

Online installation

To download Visual Studio with an online installer, just download one of the following files according to your desired edition.

Just run the file that you just downloaded. After that, you will see a screen similar to this.

Now, click on continue and now you will see this page.

On this page, you will have to select the components that you need to download. Select them and click on Install.

After this, you will see VS downloading and applying components that you selected as shown in the screenshot below.

After this, you just have to plug in your device in case you are using a laptop or a Surface device. This is so because you don't want your computer to go to sleep while this installation is taking place. And when your installer is done with applying all the required components, you will see this screen.

Eureka! You have Visual Studio 2017 installed on your machine. You can find it in the Start Menu as shown in the screen snippet below or else find it as a shortcut on your desktop.

Now, when you run Visual Studio, it will ask you to sign in with your Microsoft Account. If you are using Professional or Enterprise edition, I would recommend you to sign in with the email that you used to buy the subscription. After you are signed in, you will see this Get Started page.

First, we will see how things work inside VS 2017. Navigate to File> New > Project. A small window will pop up now which will resemble this as shown in the screen snippet below.

Just for starters and a simple program example, Choose the Visual C# library in the left panel and Console App in the list of components. And now, hit OK.

This will create a new project based on a C# Console App and open it.

Now, you can start writing your code in between those curly braces as marked in the snippet above.

Write this code in that code block. (A code block is a region between two curly brackets of a particular function. Here, the Main function.)

Console.WriteLine("Welcome to TheWindowsClub.com!"); Console.ReadLine();

Simply now your code should be looking something like this:

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace HelloWorld  class Program  static void Main(string[] args)  Console.WriteLine("Welcome to TheWindowsClub.com!"); Console.ReadLine();   

Hit F5 on your keyboard to run the program. Now, a console window will pop up showing you the output as

Welcome to TheWindowsClub.com!

You can see it here.

Now due to the code is written as  Console.ReadLine(); you will have to press any key on the keyboard to return to your code.

This was a very basic program written in C#, in case you would like to discover more, I would recommend you to check our Tutorials about Languages supported in .NET Framework and .NET Core. And in case you wish to learn from official videos, Microsoft Virtual Academy (MVA) will be able to help you. MVA will even help you certified by Microsoft directly.

TIP: To learn C# from MVA, I would highly recommend you to refer Bob Tabor's tutorials which can be found here.

If you have any further queries, feel free to comment them down, and I will try my best to address them as soon as possible.

Open Source Ports of Commercial Game Engines
Free, open source and cross-platform game engine recreations can be used to play old as well as some of the fairly recent game titles. This article wi...
Parhaat komentorivipelit Linuxille
Komentorivi ei ole vain suurin liittolainen Linuxia käytettäessä - se voi olla myös viihteen lähde, koska voit käyttää sitä pelaamaan monia hauskoja p...
Parhaat Linux-peliohjaimen kartoitussovellukset
Jos haluat pelata pelejä Linuxissa peliohjaimella tyypillisen näppäimistön ja hiiren syöttöjärjestelmän sijaan, on sinulle hyödyllisiä sovelluksia. Mo...