7 min read

Installing Visual Studio

The Crash Course

Introduction

Before we can begin writing C# code, we will need to get some tools to help us make programming easy.

At a minimum, we will need a set of tools called the Software Development Kit (SDK). The SDK is barebones. If you like using simple text editors and the command line, this could work for you.

For most, that is far too low-level to be efficient or enjoyable. Most C# programmers will start with something much more powerful: An Integrated Development Environment or IDE. An IDE combines all the tools you will need for development into one application. Every tool you could want (and probably a bunch you’ll never use) is right at your fingertips.

Picking an IDE

There are several IDEs that C# programmers use. The one you pick depends on your own personal needs, including what set of features you want, what operating system you are running on, and if you’re willing to pay money for it.

Some of the most popular ones are below:

There are others, but most C# programmers use one of those.

Keep in mind that some C# game engines and tools will provide their own editor within the engine itself. So the game engine becomes its own IDE, complete with tools designed specifically for making games in the engine. (Other engines provide no editor of their own, and require you to use another IDE, like those above. Some allow you to choose.)

Most of this tutorial set is not focused on how to use the IDE, but the C# language itself. However, there are a few times where we’ll use the IDE to get certain tasks done. Since I can’t put in instructions for every single IDE, editor, engine, and workflow, for now I’ll assume you’re using Visual Studio.

As of the time of writing this, the latest version of Visual Studio is 2019. That will change in time. (Please reach out to me if you’re reading this and Visual Studio 2022 is officially out, so I can update it.)

Having said that, the basics that we’ll encounter in this tutorial set haven’t changed significantly in decades; they are the foundation and have remained stable. So feel free to use newer (or older) versions of Visual Studio, if they’re available. Things should generally keep working.

Visual Studio Editions

Visual Studio comes in multiple editions. Each edition has a different feature set and license. There are three editions of Visual Studio 2019, in order from cheapest to most expensive:

  1. Community Edition.
  2. Professional Edition.
  3. Enterprise Edition.

Enterprise Edition has some nice, advanced features that may be worth paying for some day, but probably isn’t the right place to start.

Professional and Community Editions are both very powerful and capable. They have the same feature set. The difference is licensing.

In short, Microsoft wants the companies that can afford to pay for a good IDE to do so. However, they still want individuals and small companies that just don’t have money to still use it, even for commercial purposes. You can see the specifics on Microsoft’s website, but in short:

In short, you will either fit into one of the above categories, or the company asking you to do this has the money to pay for a Professional Edition license.

If you don’t want to use Visual Studio, feel free to pick another option. Generally, the things we do in the IDE will be pretty obvious in whichever IDE you pick (things like adding a new file or creating a new project).

But just to be clear: Yes, Visual Studio Community Edition allows you to do commercial development. You can make software with this in your spare time or in your startup (that meets the above requirements) and sell it for money.

Installing Visual Studio 2019

The program we want to install can be found here: https://visualstudio.microsoft.com/vs/community/.

Follow the link, and click on the download button.

The installation process doesn’t really have any surprises. If you’ve installed software before, you know the drill.

What you download initially, however, will be the Visual Studio Installer, not Visual Studio itself. Once it is downloaded, you will need to run it and use it to install Visual Studio.

Installing the Right Workloads

Visual Studio is a complex, but powerful tool. It has a plugin system, which means you can pick and choose which features you want to install. Depending on what you want to make, you’ll want to install different components.

You probably don’t want to install everything. That would take up a lot of disk space, and you probably wouldn’t ever touch most of it. Instead, you’ll pick and choose the components you want a la carte, and go back and re-run the installer if you decide you want more (or less).

While you can pick and choose each item you want individually, Visual Studio has pre-packaged workloads . These workloads identify a set of plugins that work together to do a certain type of programming.

Most of the time, you can just pick the workloads you need, and call it a day, without micromanaging the plugins you install.

For what we’re doing in this tutorial set, the only workload you’ll need is the one called .NET Core cross-platform development, shown in the picture below:

Check the box for the .NET Core cross-platform development workload

If you see other workloads that seem interesting, feel free to install them. But you can always come back and add them later by re-running the installer.

After you’ve picked the workloads you want, tell the installer to begin downloading and installing them. It usually takes a minute or two to get everything installed, but it will depend on your Internet speed.

The Registration Thing…

When you get Visual Studio installed, it will ask you to log in with (or create) a Microsoft account. If you don’t already have one, you’ll have to create one eventually. (You will get 30 days of use before you have to register it. But remember, Visual Studio Community Edition does not require payment, just making an account.)

I wish creating and using a Microsoft account weren’t a necessity, but there doesn’t seem to be a good way around it. The good news is that Microsoft is pretty responsible with your email address. I get an occasional email from them about software updates (which I’m fairly certain could be turned off), but it has never felt like spam to me.

Running Visual Studio

Once the program is installed, you will be able to run it like any other program. It may add an icon to your desktop (or not) but you will always be able to find it in the Start Menu (under “Microsoft Visual Studio 2019”).

The first time you run Visual Studio, it may ask you to log in, and it will ask you to pick some default settings, such as a color theme. Pick what you think will work best for you. You can change these settings later, if you change your mind.

At this point, make sure you can at least get Visual Studio open to the launch screen:

Visual Studio launch screen

You may see some slight differences, depending on what you installed. (And you probably won’t have anything on the left side under your recent projects, initially.)

As long as you can see this screen, you’re ready to move on to the next tutorial!