Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Hands-On Visual Studio 2022
Hands-On Visual Studio 2022

Hands-On Visual Studio 2022: A developer's guide to exploring new features and best practices in VS2022 for maximum productivity

Arrow left icon
Profile Icon Miguel Angel Teheran Garcia Profile Icon Hector Uriel Perez Rojas
Arrow right icon
AU$14.99 AU$77.99
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.2 (12 Ratings)
eBook Jun 2022 350 pages 1st Edition
eBook
AU$14.99 AU$77.99
Paperback
AU$96.99
Subscription
Free Trial
Renews at AU$24.99p/m
Arrow left icon
Profile Icon Miguel Angel Teheran Garcia Profile Icon Hector Uriel Perez Rojas
Arrow right icon
AU$14.99 AU$77.99
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.2 (12 Ratings)
eBook Jun 2022 350 pages 1st Edition
eBook
AU$14.99 AU$77.99
Paperback
AU$96.99
Subscription
Free Trial
Renews at AU$24.99p/m
eBook
AU$14.99 AU$77.99
Paperback
AU$96.99
Subscription
Free Trial
Renews at AU$24.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Hands-On Visual Studio 2022

Chapter 1: 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 to design, develop, debug, and deploy all .NET applications and even other technologies.

In this chapter, you will learn about the history, historical versions, and installation process of VS, as well as the initial configurations to start working with this IDE. After learning about the VS flavors, you will be able to choose the option that best suits your needs.

By the end of this chapter, you will get a brief overview of VS's history and understand the main evolutionary changes across its different versions. You will also learn how to install and start using this amazing tool.

In this chapter, you will learn about the following main topics:

  • A brief history of VS
  • VS flavors
  • Installing VS 2022
  • VS for Mac

Technical requirements

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

  • Windows 10, version 1909 or higher
  • Windows Server, 1016 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, go to https://docs.microsoft.com/en-us/visualstudio/releases/2022/system-requirements.

A brief history of VS

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 all project types.

To understand the evolution of this tool, 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.

VS started as a premium application with a closed license, but since VS 2005, Microsoft began a new strategy with a freemium (free/premium) version, which is a basic/free public version that you can use for your personal projects, study, or midsize applications, and other versions at a cost for professional developers, large companies, or for those who want to use advanced tools.

Microsoft releases a new VS version every 2 or 3 years and provides updates for that version every 2 or 3 months, which means complete support.

A version of note is VS 2012 because the development team implemented a new look and feel and many improvements in the user experience, which are also present in the 2022 version. Some of the most important improvements in VS 2012 over previous versions were performance, the possibility to choose from light and dark themes, and new icons.

Now that you have a general idea of what VS is, let's examine each of the flavors available today.

VS flavors

Since version 2012, VS has had three flavors that cover all developers' preferences and needs. Just one of these three alternatives is completely free for the community.

In the following sections, you will see the differences between each version and learn about the features supported by each version, which are the following:

  • Visual Studio Community
  • Visual Studio Professional
  • Visual Studio Enterprise

So, let's understand the main aspects of each version.

Visual Studio Community

Visual Studio Community is a free version that incorporates all the basic tools to create, build, debug, and deploy .NET applications and all the collaboration instruments integrated into VS.

Visual Studio Community has a limit of five users and is restricted to non-enterprise organizations.

The main tools in Visual Studio Community are the following:

  • Basic debugging tools (tools for inspecting code during debugging)
  • A performance and diagnostics hub (tools to analyze application performance and memory use)
  • Refactoring tools (tools to clean and style code following best practices)
  • Unit testing (a feature to navigate, run, and collect results from unit tests)
  • Peek definition (a functionality to navigate to the definition of a method or function)
  • VS Live Share (a tool for real-time collaboration development)

This version is suitable for students, independent developers, freelancers, and small companies. Even though this version includes all the main tools that you will use on a daily basis, in some scenarios associated with unit testing, memory, or inspection, these tools aren't enough.

Visual Studio Professional

Visual Studio Professional is a licensed version of VS offered by subscription; this version is recommended for enterprise applications and teams with more than five developers. VS Professional includes the same tools as Visual Studio Community but with some additions, such as CodeLens (a VS feature to find references, changes, and unit testing in code).

At the time of writing, the cost of VS professional subscription is $45 per month for an individual user.

The professional subscription includes $50 in Azure credit, training, support, and Azure DevOps (basic plan).

Visual Studio Enterprise

Visual Studio Enterprise is the top-level subscription version of VS (with Visual Studio Professional) that includes all of VS Community's features, Visual Professional's improvements, and some additional tools.

Some features to highlight are as follows:

  • Live unit testing (a feature wherein unit testing is rerun every time a change is made)
  • The Snapshot Debugger (a tool for saving snapshots during debugging when an error occurs)
  • Performance analysis tools for mobile applications
  • Architectural layer diagrams (to visualize the logical architecture of your app)

Enterprise subscription has a $250 fee per month, but it includes $150 in Azure credit, Power BI Pro, Azure DevOps with test plans, and all the features available for VS.

To see a comparison of the different flavors and prices, you can go to https://visualstudio.microsoft.com/vs/pricing/.

Important Note

For this book, we are going to use Visual Studio Community. Since this is a free version, you don't have to pay any subscription, and all the topics are covered with this version.

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 workload modifications to create different types of projects.

In this section, you will learn how to do the following:

  • Get the installer from the VS website
  • Install VS

Let's see how to carry out the installation process in detail.

Getting the installer from the website

VS is easy to install, and you don't need an account or to take a lot of steps to get the installer. By typing Visual Studio community Download in any browser, you can easily find the link to download VS from the official page.

From the following link, you can directly get the installer:

https://visualstudio.microsoft.com/downloads/

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

Figure 1.1 – Downloading VS

Figure 1.1 – Downloading VS

Installation process

Once you have downloaded the VS installer, you must run it to start the update process of the installer itself, as shown in Figure 1.2:

Figure 1.2 – Updating the VS installer

Figure 1.2 – Updating the VS installer

VS is an IDE that is constantly updated by the development team, so the installer will always look for the latest available update to perform the corresponding installation.

When the installer update has been completed, the initial screen of the installer will be presented, which is composed of four main sections, with the Workloads section the one that is displayed by default.

Figure 1.3 – The VS Workloads tab

Figure 1.3 – The VS Workloads tab

It is possible to find workloads for different types of projects – for example, mobile projects, desktop-focused projects, and Python-focused projects, among others.

To install the templates and tools related to web development, you must select the workload called ASP.NET and web development, as shown in Figure 1.3.

Each workload includes a set of tools and components associated with the technology selected.

However, it is also possible to select these components individually, within the tab called Individual components, as shown in Figure 1.4:

Figure 1.4 – The VS Individual components tab

Figure 1.4 – The VS Individual components tab

These components are grouped into categories, such as .NET, clouds, databases, and servers, among others, and you only need to select a component to add it to the installation.

Within the tab called Language packs, you will be able to select the language or languages of the VS interface, as shown in Figure 1.5:

Figure 1.5  – The VS Language packs tab

Figure 1.5 – The VS Language packs tab

This is very useful, since the default language usually corresponds to the language in which the VS installer has been downloaded. From here, you will be able to deselect the default language and select a different one or multiple languages to switch between in your development process.

In the last tab called Installation locations, you can configure the system paths of both the VS IDE and the download cache, as shown in Figure 1.6:

Figure 1.6 – The VS Installation locations tab

Figure 1.6 – The VS Installation locations tab

In this tab, you will be able to see how much space is needed in each of the paths to perform a correct installation.

Finally, there is a list of options to choose the installation method – whether you want to proceed to download all the components and install them at the same time, or you want to download all the necessary components first and install them later (Figure 1.7):

Figure 1.7 – The VS Install button

Figure 1.7 – The VS Install button

If you agree with the details and size of the installation, you can proceed to start the process by clicking on the Install button.

Once you have clicked the button to start the installation, a window will appear showing the details of the download and installation of the components, as shown in Figure 1.8:

Figure 1.8 – The VS installation in process

Figure 1.8 – The VS installation in process

Once the installation process has finished, a window will appear, suggesting that you log in with a Microsoft account to get a license for the use of the tool. It is recommended that you log in at this time so that you do not lose access to the tool in the future, as shown in Figure 1.9:

Figure 1.9 – The VS login window

Figure 1.9 – The VS login window

After you have obtained a license to use VS 2022, you will be shown the startup screen for creating, cloning, and opening projects, so 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 used to create web applications with C# and XAML, which was executed through a plugin in the browser).

After installing VS and getting the first screen, you can open VS using the Continue without code option.

You will now see the main screen in VS without having opened or created any project. For now, you only need to know that you can check the version and VS documentation using the Help menu (Figure 1.11):

Figure 1.11 – The VS main screen and help menu

Figure 1.11 – The VS main screen and help menu

In Figure 1.11, the About Microsoft Visual Studio option is highlighted; by clicking on it, you will know the version being used and whether there is any update to install.

Figure 1.12 – The About Microsoft Visual Studio screen

Figure 1.12 – The About Microsoft Visual Studio screen

Finally, if you need to repair, modify, or uninstall VS, you can use the VS installer that you downloaded earlier, or search for the term Visual Studio Installer in Windows Explorer at any time. Also, it will find updates and show you other versions that you can install or try (Figure 1.13):

Figure 1.13 – The VS Installer options

Figure 1.13 – The VS Installer options

Now that we know the VS 2022 installation process, let's explore VS for Mac users.

VS for Mac

VS has a new version for Mac users. Using this version, developers can have a similar experience in MacOS as Windows users.

Due to incompatibility issues, which have to do with the operating system, .NET Framework is not supported in VS for Mac, only VS for Windows.

Figure 1.14 – VS for Mac – the startup screen

Figure 1.14 – VS for Mac – the startup screen

In Figure 1.14, you can see how VS for Mac looks when it is opened; it looks pretty much like the Windows version. The user can choose a recent project, open a project, or create a new one.

Important Note

Even though VS for Mac was made using technology for macOS operating system, the development team is working to maintain the same experience as VS for Windows.

Figure 1.15 – VS for Mac – the main screen

Figure 1.15 – VS for Mac – the main screen

After opening a project, you can set up your toolbar, but by default, VS for Mac has the Solution Explorer, Properties, and Errors sections. VS for Mac is an excellent option for developers that need debugging and performance tools as well as for .NET MAUI (technology to create native apps using C# and XAML or using Blazor) developers who want to create apps for Android, iOS, and MacOS.

If you want to try VS for Mac, you can get the installer at the following link:

https://visualstudio.microsoft.com/vs/mac/

Summary

In this chapter, you have learned what VS is, the different versions of the IDE available that you can choose to suit your project needs, the installation processes of VS 2022 for Windows, and the general concept of VS for Mac.

In Chapter 2, Configuring the IDE, you will learn how to customize the IDE to suit your needs as a web developer.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Discover solutions to common problems faced while using Visual Studio 2022
  • Explore tips, tricks, and best practices and discover ways to overcome source-code challenges
  • Deep dive into Visual Studio’s new features and unleash its potential to enhance your coding journey

Description

Visual Studio 2022 is the complete and ideal integrated development environment (IDE) for creating large, complex, and scalable applications. It is one of the most complete tools available for development, especially with Microsoft technologies. This book will teach you how to take advantage of the tools available with this IDE to write clean code faster. You’ll begin by learning how to set up and start Visual Studio 2022 and how to use all the tools provided by this IDE. You will then explore key combinations, tips, and additional utilities that can help you to code faster and review your code constantly. Next, you will see how to compile, debug, and inspect your project to analyze its current behavior using Visual Studio. The book also shows you how to insert reusable blocks of code writing simple statements. Later, you will learn about visual aids and artificial intelligence that will help you improve productivity and understand what is going on in the project. By the end of this book, you will be able to set up your development environment using Visual Studio 2022, personalize the tools and layout, and use shortcuts and extensions to improve your productivity.

Who is this book for?

This book is for .NET software developers focusing on web development and web developers who want to learn about the new features, tools, and features available in Visual Studio 2022. Basic knowledge of HTML, CSS, and JavaScript or frameworks such as React and Angular is assumed.

What you will learn

  • Understand what s new in Visual Studio 2022
  • Discover the various code tools to improve productivity
  • Explore the benefits of using .NET 6 in Visual Studio 2022
  • Perform compilation, debugging, and version control comfortably
  • Become well-versed with various shortcuts, tricks, tips, and tools to improve productivity within Visual Studio 2022
  • Implement remote and collaborative work with Visual Studio 2022

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jun 30, 2022
Length: 350 pages
Edition : 1st
Language : English
ISBN-13 : 9781801817295
Vendor :
Microsoft
Languages :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Jun 30, 2022
Length: 350 pages
Edition : 1st
Language : English
ISBN-13 : 9781801817295
Vendor :
Microsoft
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
AU$24.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
AU$249.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just AU$5 each
Feature tick icon Exclusive print discounts
AU$349.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just AU$5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total AU$ 234.97
Hands-On Visual Studio 2022
AU$96.99
Apps and Services with .NET 7
AU$68.99
C# 11 and .NET 7 – Modern Cross-Platform Development Fundamentals
AU$68.99
Total AU$ 234.97 Stars icon
Banner background image

Table of Contents

19 Chapters
Part 1: Visual Studio Overview Chevron down icon Chevron up icon
Chapter 1: Getting Started with Visual Studio 2022 Chevron down icon Chevron up icon
Chapter 2: Configuring the IDE Chevron down icon Chevron up icon
Chapter 3: Improvements in Visual Studio 2022 Chevron down icon Chevron up icon
Chapter 4: Creating Projects and Templates Chevron down icon Chevron up icon
Chapter 5: Debugging and Compiling Your Projects Chevron down icon Chevron up icon
Part 2: Tools and Productivity Chevron down icon Chevron up icon
Chapter 6: Adding Code Snippets Chevron down icon Chevron up icon
Chapter 7: Coding Efficiently with AI and Code Views Chevron down icon Chevron up icon
Chapter 8: Web Tools and Hot Reload Chevron down icon Chevron up icon
Chapter 9: Styling and Cleanup Tools Chevron down icon Chevron up icon
Chapter 10: Publishing Projects Chevron down icon Chevron up icon
Part 3: GitHub Integration and Extensions Chevron down icon Chevron up icon
Chapter 11: Implementing Git Integration Chevron down icon Chevron up icon
Chapter 12: Sharing Code with Live Share Chevron down icon Chevron up icon
Chapter 13: Working with Extensions in Visual Studio Chevron down icon Chevron up icon
Chapter 14: Using Popular Extensions Chevron down icon Chevron up icon
Chapter 15: Learning Keyboard Shortcuts Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.2
(12 Ratings)
5 star 41.7%
4 star 8.3%
3 star 0%
2 star 25%
1 star 25%
Filter icon Filter
Top Reviews

Filter reviews by




SAINESHWAR Jul 15, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Great book for beginners and intermediates alike.This book gives you a complete overview of New Visual Studio 2022 in detail, with lots of new features explained in simple language, along with high-resolution images that help you follow each step in the book in a step-by-step way.The book also includes useful Visual Studio shortcuts that will help you increase your productivity.Top 5 Features which I Liked in this book.1. Web Tools and Hot Reload2. Adding Code Snippets3. Exploring breakpoints in Visual Studio4. Working with Extensions in Visual Studio5. Coding Efficiently with AI and Code Views
Amazon Verified review Amazon
Frank Aug 13, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
A good book for reference to the many things that you change/set to make your development good more smoothly.
Amazon Verified review Amazon
cesar Jul 13, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
if you are either way a beginner or advanced and want to immerse in the use of VS2022 that book is for you, great examples and a great way to handle the tool,
Amazon Verified review Amazon
Charlin Agramonte Jul 29, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
if you are a beginner and want a step-by-step guide on how to use Visual Studio 22 or you are a dev interested on learning what's new on VS22 I really recommend it.https://amzn.to/3oGxhC0
Amazon Verified review Amazon
Bearded Wizard Nov 25, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Hands-On Visual Studio 2022 is a fantastic book. I learned helpful tool tips and tricks to help increase my work productivity. Especially in Chapters 5: Debugging and compiling your Projects, and Chapter 11, GitHub Integration, I learned about features in Visual Studio that I didn't know existed. Understanding how to use your IDE is just as important as the language you are learning. This is an excellent book for all who want to expand their skills and improve their workflow.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.