Reader small image

You're reading from  Hands-On Visual Studio 2022 - Second Edition

Product typeBook
Published inMar 2024
PublisherPackt
ISBN-139781835080443
Edition2nd Edition
Right arrow
Authors (2):
Hector Uriel Perez Rojas
Hector Uriel Perez Rojas
author image
Hector Uriel Perez Rojas

Hector is an experienced senior developer, with more than 10 years of experience in developing desktop, web, and mobile solutions with the .NET platform. He was recognized with the Microsoft MVP award for two consecutive years in 2021 and 2022. He is an active member of the .NET community and is the founder of El Camino Dev and Devs School academies.
Read more about Hector Uriel Perez Rojas

Miguel Angel Teheran Garcia
Miguel Angel Teheran Garcia
author image
Miguel Angel Teheran Garcia

Miguel Angel Teheran Garcia is a solutions Architect and Technical Lead recognized as a Microsoft MVP, C# corner MVP, and Alibaba Cloud MVP. He is a member of the Avanet community in Medellín and an active member of tech events in Colombia. He has also been a speaker at different conferences around Latin America.
Read more about Miguel Angel Teheran Garcia

View More author details
Right arrow

Getting Started with Visual Studio 2022

Visual Studio (VS) is the most popular integrated development environment (IDE) for .NET developers. It’s the perfect tool for designing, developing, debugging, and deploying all .NET applications and even other technologies.

This book has been written concerning the latest developments and features added to the IDE, which are very interesting and useful to developers of all platforms. Throughout this book, you will discover the different tools and options of the IDE to develop applications in general, thus helping you make it your own. This will make become your most powerful ally when creating applications.

In this chapter, you will learn about the evolution of VS as well as the improvements introduced in the new version. After, you will learn how to install the IDE, take a general tour of the graphical interface, customize it according to your preferences, and explore the accessibility features included in the IDE.

By the end...

Technical requirements

We will begin this chapter by learning how to install VS 2022. To get VS to run on your machine, you will need the following:

  • Windows 10 minimum supported operating system version or higher: Home, Professional, Education, or Enterprise
  • Windows 11 minimum supported operating system version or higher: Home, Pro, Pro Education, Pro for Workstations, Enterprise, or Education
  • Windows Server, 2016 or higher
  • A 1.8 GHz or faster 64-bit processor; quad-core or better is recommended
  • 4 GB of RAM; 8 GB is recommended
  • Hard disk free space – 25 GB (up to 40 GB depending on the components installed)
  • Administrator rights
  • Full internet access during the installation

Important note

32-bit and ARM operating systems are not supported; you will need either Windows 10 Enterprise LTSC edition, Windows 10 S, or Windows 10 Team Edition. To check all the requirements and technologies or systems not supported, visit https://docs.microsoft...

A brief history of VS and its flavors

VS 2022 is version 13 of this application created by Microsoft. VS has been consolidated among developers for having a friendly user experience, good support with regular updates, and powerful tools for writing clean and scalable code. VS has support for many technologies and platforms. For many developers, VS is the ultimate tool for the creation of web, mobile, and desktop projects, as we will see throughout this book.

To understand the evolution of VS, we must examine its history and timeline.

VS 6.0 was released in 1997, and it was the first version of this tool. This version was created to work with Visual Basic 6.0. Then, in 2002, a new version was released, which included compatibility with .NET and C# (a new programming language at that time). Since then, it’s been the favorite tool for .NET developers.

Since the 2012 version, the development team has implemented a new look and feel and introduced many improvements in the...

Improvements in VS 2022

Significant enhancements have been introduced in VS 2022. One of the most important is the transition to a 64-bit architecture, which introduces a significant performance improvement.

Let’s take a closer look at the specific enhancements.

A 64-bit architecture

A simple but important feature in VS 2022 is the new architecture, which is 64-bit. This is a change that we cannot see, but internally, it takes advantage of a 64-bit CPU, which is common in current laptops and PCs, to improve performance and reduce delays in the execution of multiple tasks.

Using Task Manager in Windows, you will be able to notice the difference when VS 2019 and 2022 are running at the same time:

Figure 1.1 – VS 2022 on the 64-bit platform and VS 2019 on the 32-bit platform

Figure 1.1 – VS 2022 on the 64-bit platform and VS 2019 on the 32-bit platform

With a 32-bit architecture, there was an access limitation of 4 GB of memory. Now, thanks to a 64-bit architecture, it is possible to access a larger amount...

Installing VS 2022

The VS installation process has improved with each new version that has been released. Today, it is even possible to reuse the same installer to perform upgrades or make workload modifications to create different types of projects.

Getting the installer from the website

VS is easy to install, and you don’t need an account or take a lot of steps to get the installer. Simply go to the following link, where you can get the installer directly: https://visualstudio.microsoft.com/downloads/.

On the web page, go to the Visual Studio section, click on the drop-down control marked Download Visual Studio, and select the Community option (see Figure 1.5):

Figure 1.5 – Downloading VS

Figure 1.5 – Downloading VS

Note

If the download site shows a new version of VS, you can find the download links to VS 2022 and other previous versions at https://visualstudio.microsoft.com/vs/older-downloads/.

Once you have downloaded the VS installer, you must run...

Introduction to the IDE

Now that VS 2022 is installed, you will be shown the startup screen for creating, cloning, and opening projects. From here, you can check that the installation has been successful, as shown in Figure 1.10:

Figure 1.10 – The VS startup window

Figure 1.10 – The VS startup window

Important note

You can have different versions of VS on the same machine; for compatibility with all technology, sometimes, we need to keep old versions – for example, VS 2010 to work with Silverlight (an unsupported framework that’s used to create web applications with C# and XAML, which was executed through a plugin in the browser).

Let’s go directly to the interface without creating any project yet via the Continue without code option. Once you are in the main interface of VS, at the top, you will be able to see the Options menu, which provides a wide range of tools for different purposes, as well as buttons to perform common actions quickly, such as starting...

Customizing the IDE

In general, it is common for software developers to have different tastes in writing code. This also applies in the configuration part of the tool you use to develop, such as whether you want to change the general color of the IDE or prefer to change the default font to one that suits you better. In this section, we’ll look at some of the customizations available in VS 2022.

Selecting a VS theme

The first time you start VS 2022, you will be presented with a dark window, as shown in Figure 1.17. This is because the default dark theme has been applied:

Figure 1.17 – VS default theme

Figure 1.17 – VS default theme

Although the dark theme has been applied by default, there are several pre-installed themes, as shown in Figure 1.19:

  • Blue
  • Blue (Extra Contrast)
  • Dark
  • Light
  • Use system setting

Each of these options has a set of pre-established colors that you will be able to preview using the same window.

Important note

...

Accessibility features

VS includes several features that make it more friendly to those who are visually impaired.

First, it includes a blue theme with extra contrast, as shown in Figure 1.19. This theme helps maximize readability and reduce fatigue for people with vision problems such as color blindness or those with eyestrain and may even be useful for developers who spend a lot of time in front of the computer.

Another feature that has been recently introduced is the ability to add sounds when certain events happen in the IDE. For example, you could add a sound to alert you when the execution of an application reaches a breakpoint, or when there is an error in your code.

To add sounds, follow these steps:

  1. Enable the feature by going to Tools | Options | Text Editor | General, and enable the Enable audios cues option, as shown here:
Figure 1.30 – Window to enable audio cues

Figure 1.30 – Window to enable audio cues

  1. Next, open Windows search by pressing the Start...

Summary

In this chapter, we provided a brief history of VS, as well as the improvements that were introduced in this new version of VS. Next, you learned how to install VS, as well as how to work with the panels and windows to suit your style and way of working.

You also learned how to customize the IDE, both in terms of the theme and the fonts used in Code Editor and the VS graphical user interface (GUI). You also know how to customize the toolbars and menu bars. Finally, you studied some accessibility features that you can use in case you or a colleague needs them.

In the next chapter, Chapter 2, Creating Projects and Templates, you will learn how to create your first project in VS and understand the most used templates and the types of projects you can create.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Hands-On Visual Studio 2022 - Second Edition
Published in: Mar 2024Publisher: PacktISBN-13: 9781835080443
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Authors (2)

author image
Hector Uriel Perez Rojas

Hector is an experienced senior developer, with more than 10 years of experience in developing desktop, web, and mobile solutions with the .NET platform. He was recognized with the Microsoft MVP award for two consecutive years in 2021 and 2022. He is an active member of the .NET community and is the founder of El Camino Dev and Devs School academies.
Read more about Hector Uriel Perez Rojas

author image
Miguel Angel Teheran Garcia

Miguel Angel Teheran Garcia is a solutions Architect and Technical Lead recognized as a Microsoft MVP, C# corner MVP, and Alibaba Cloud MVP. He is a member of the Avanet community in Medellín and an active member of tech events in Colombia. He has also been a speaker at different conferences around Latin America.
Read more about Miguel Angel Teheran Garcia