Installing Visual Studio
The Crash Course
- To program in C#, we will need a program that allows us to write C# code and run it. That program is Microsoft Visual Studio 2022 Community Edition. It can be downloaded and installed as you'd expect.
Introduction
Welcome to the world of C# programming! Your first step before writing any code will be to download and install the latest version of Microsoft Visual Studio, which is the 2022 edition.
There are several versions of Visual Studio that exist, which include Visual Studio Community Edition, Visual Studio Professional, Visual Studio Premium, and Visual Studio Ultimate.
For the vast majority of people, I recommend going with Visual Studio Community, primarily because it is free (while still allowing for commercial development).
Community and Professional have identical feature sets, while Premium and Ultimate have some extra nice features. They do come at a rather high cost, though. If you've got the money, you can do the research and determine if it's worth it.
The Community edition is free, while Professional is not. The only difference is how you can use them. So here are the basic requirements to be able to use Community:
1. If you're using it for educational use or for open source development, you can use Community freely.
2. If you have 5 or fewer developers AND your company has less than 250 computers AND makes less than $1Million in revenue, you can use Community freely.
As you can see, between the educational aspect, the open source aspect, or the size of the company aspect, most people who read this tutorial are covered.
If you are learning C# at work, and your company is too big to be covered under #2, your company can probably find the $500 or so to buy Professional and should do so.
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 2022 Community Edition
The program we want to install can be found here: https://visualstudio.microsoft.com/vs/
Follow the link, and click on the download button.
You will then follow the normal installation steps that every program has until the software is installed.
Installation typically takes several minutes, maybe upwards of 20 minutes or so, if you have a slower Internet connection. The installation for Visual Studio may also involve installing many smaller components and so on, which Visual Studio will need to work on, so if it asks you for permission to install other components, don't be surprised.
When it asks you for the workloads and components that you want to install, make sure to check the box for .NET desktop development, as that has the components we'll use in this tutorial set. You can install other workloads and components if you'd like, but be sure to get at least that one. (You can always re-run the installer to modify what components have been added if you change your mind later or just want to see what's available.)
The Registration Thing…
Visual Studio will ask you to register to use it. I've found that useful because I can get updates about what is going on, and I'm able to sync settings across multiple computers. But this isn't strictly necessary if you don't want to do so.
Running Visual Studio 2022
Once the program is installed, you will be able to run it like any other program. It may add an icon to your desktop, but it will also show up in your Start Menu if you search for "Visual Studio."
What's Next?
Now that we've got a program installed that allows us to write C# code, we're all ready to go and get started with our first program!
Post preview:
Close preview