Hands-On Visual Studio 2022: A developer's guide to new features and best practices with .NET 8 and VS 2022 for maximum productivity, 2nd Edition / Практический курс Visual Studio 2022: Руководство разработчика по новым функциям и рекомендациям по работе с .NET 8 и VS 2022 для максимальной производительности, 2-е издание
Год издания: 2024
Автор: Rojas Hector Uriel Perez, Garcia Miguel Angel Teheran / Рохас Эктор Уриэль Перес, Гарсия Мигель Анхель Тегеран
Издательство: Packt Publishing
ISBN: 978-1-83508-044-3
Язык: Английский
Формат: PDF
Качество: Издательский макет или текст (eBook)
Интерактивное оглавление: Да
Количество страниц: 336
Описание: Unlock the power of Visual Studio 2022 with this step-by-step illustrated guide and leverage its powerful features
Key Features:
Ride the wave of artificial intelligence using the new GPT-based extensions
Explore tips, tricks, and best practices to discover ways to overcome source-code challenges
Get to grips with Visual Studio's basic and advanced features to harness its full potential and enhance your coding journey
Book Description:
Visual Studio 2022 is widely recognized as the best IDE (Integrated Development Environment) for application development across various domains. This book is a comprehensive guide for both beginners and experienced .NET developers who wish to familiarize themselves with its basic, advanced, and new features.
This book is divided into three sections: the first is an overview of Visual Studio, the second part explores tools for productivity within the IDE, and the third delves into integration with GitHub and Visual Studio extensions.
In this second edition, we've also expanded the chapters on the use of Visual Studio to environments beyond web development, such as Azure, Desktop, .NET MAUI, and others. Updates to the IDE introduced since the release year of the first edition of the book in 2022 have also been included, such as the use of GPT-based extensions like GitHub Copilot and GitHub Copilot Chat, as well as profiling tools.
The book reviews breakpoint groups, a new way to configure breakpoints, as well as tools for web development, such as Browser Link, Dev Tunnels, and Web API Endpoints Explorer. For more advanced developers, the book addresses the topic of developing extensions through the use of the new Visual Studio SDK. By the end of this book, you'll have a better understanding of Visual Studio 2022 and how to use it to its fullest potential.
What You Will Learn:
Discover what's new in Visual Studio 2022
Get to grips with the new features in code tools to improve productivity
Explore latest compilation and debugging tips
Unveil shortcuts, tricks, tips, and tools to improve productivity within Visual Studio 2022
Leverage remote and collaborative work with Visual Studio 2022
Find out how to create new projects and templates in Visual Studio 2022
Enhance your skills by learning general tools, shortcuts, and tips for .NET developers
Implement version control with Git Integration into your workflow
Who this book is for:
This book is for .NET developers who want to learn how to use the latest features, tools, and extensions available in Visual Studio 2022. To get the most out of the book, general knowledge of C# is recommended. Knowledge of web development, Azure, .NET MAUI, and Desktop with .NET will help you follow along, but it's not a prerequisite.
Раскройте возможности Visual Studio 2022 с помощью этого пошагового иллюстрированного руководства и используйте его мощные функции
Ключевые функции:
Поднимитесь на волне искусственного интеллекта, используя новые расширения на основе GPT
Изучите советы, хитрости и лучшие практики, чтобы найти способы преодоления проблем с исходным кодом
Познакомьтесь с базовыми и расширенными функциями Visual Studio, чтобы полностью использовать ее потенциал и улучшить свой опыт программирования
Описание книги:
Visual Studio 2022 широко признана лучшей IDE (интегрированной средой разработки) для разработки приложений в различных областях. Эта книга представляет собой всеобъемлющее руководство как для начинающих, так и для опытных разработчиков .NET, которые хотят ознакомиться с ее базовыми, расширенными и новыми функциями.
Эта книга разделена на три раздела: первый представляет собой обзор Visual Studio, во второй части рассматриваются инструменты для повышения производительности в среде IDE, а в третьей рассматривается интеграция с GitHub и расширениями Visual Studio.
В этом втором издании мы также расширили главы, посвященные использованию Visual Studio, на среды, выходящие за рамки веб-разработки, такие как Azure, Desktop, .NET MAUI и другие. Также были включены обновления IDE, появившиеся с момента выхода первого издания книги в 2022 году, такие как использование расширений на основе GPT, таких как GitHub Copilot и GitHub Copilot Chat, а также инструменты профилирования.
В книге рассматриваются группы точек останова, новый способ настройки точек останова, а также инструменты для веб-разработки, такие как Browser Link, Dev Tunnels и Web API Endpoints Explorer. Для более продвинутых разработчиков в книге рассматривается тема разработки расширений с использованием нового Visual Studio SDK. К концу этой книги вы будете лучше понимать Visual Studio 2022 и то, как использовать ее в полной мере.
Что Вы узнаете:
Узнаете, что нового в Visual Studio 2022
Ознакомитесь с новыми функциями code tools для повышения производительности
Ознакомитесь с последними советами по компиляции и отладке
Ознакомитесь с ярлыками, хитростями, советами и инструментами для повышения производительности в Visual Studio 2022
Использовать удаленную и совместную работу с Visual Studio 2022
Узнаете, как создавать новые проекты и шаблоны в Visual Studio 2022
Совершенствуйте свои навыки, изучая общие инструменты, сочетания клавиш и советы для .NET-разработчиков
Внедрите управление версиями с помощью интеграции Git в свой рабочий процесс
Для кого предназначена эта книга:
Эта книга предназначена для .NET-разработчиков, которые хотят научиться использовать новейшие функции, инструменты и расширения, доступные в Visual Studio 2022. Чтобы извлечь максимальную пользу из книги, рекомендуется общее знание C#. Знание веб-разработки, Azure, .NET MAUI и рабочего стола с .NET поможет вам продвигаться вперед, но это не обязательное условие.
Примеры страниц (скриншоты)
Оглавление
Preface xiii
Part 1: Visual Studio Overview
1
Getting Started with Visual Studio 2022 3
Technical requirements 4
A brief history of VS and its flavors 4
VS Community 5
VS Professional 5
VS Enterprise 6
Improvements in VS 2022 6
A 64-bit architecture 7
New icons and styles 8
.NET 8 support 9
Hot Reload 10
Other improvements 10
Installing VS 2022 11
Getting the installer from the website 11
Introduction to the IDE 14
Customizing panels 16
Working with documents 19
Customizing the IDE 21
Selecting a VS theme 21
Customizing fonts and colors in the environment 23
Synchronizing accounts and settings 25
Customizing the menu bar and toolbars 26
Accessibility features 31
Summary 33
2
Creating Projects and Templates 35
Technical requirements 35
Selecting and searching for templates 36
Templates for web development 41
Templates for ASP.NET Core web applications 42
Templates for SPAs 46
Templates for web APIs 52
Templates for multiplatform
development 55
Templates for desktop development 58
Summary 61
3
Debugging and Profiling Your Apps 63
Technical requirements 64
Understanding compilation in
VS 2022 64
How to build a project in VS 2022 64
Build versus Rebuild versus Clean 65
What happens after compilation? 66
Debugging projects in VS 69
Understanding the technical aspects
of debugging 69
Differentiating between debug mode and
release mode 69
Project debugging initialization options 70
Exploring breakpoints in VS 71
Navigating between breakpoints 73
Different types of breakpoints 74
Breakpoint groups 83
Quickly debugging with Run to click and
Force to click 86
Inspection tools for debugging 86
The Watch window 87
The Autos and Locals windows 88
Measuring app performance with
profiling tools 90
Analyzing the performance of an application 90
Analyzing memory usage in your apps 93
Summary 95
Part 2: Tools and Productivity
4
Adding Code Snippets 99
Technical requirements 99
What are code snippets? 99
Creating code snippets 104
Deleting code snippets 109
Importing code snippets 110
Summary 113
5
Coding Efficiently with AI and Code Views 115
Technical requirements 116
Understanding CodeLens 116
Finding references in code 117
Code maps 118
Working with code views 122
Class View 122
Using Visual IntelliCode 124
Whole line completions 124
IntelliCode suggestions 126
Exploring GitHub Copilot 128
Using Copilot for code hints 129
Using GitHub Copilot Chat 133
Summary 138
6
Using Tools for Frontend and Backend Development 139
Technical requirements 140
Using scaffolding 140
Installing JavaScript and
CSS libraries 145
Debugging in JavaScript 149
Hot Reload 152
Dev tunnels 154
Creating a dev tunnel 154
Connecting through the tunnel 158
Web API Endpoints Explorer 159
HTTP editor 161
Summary 163
7
Styling and Cleanup Tools 165
Technical requirements 165
Woking with CSS styling tools 166
CSS3 snippets 166
Hierarchical CSS indentation 167
Color picker 168
IntelliSense in style files 170
Working with images 172
Cleaning code with code
analysis tools 175
Code quality analysis 175
Working with code styles 177
Configuring a code cleanup profile 180
Executing code cleanup 181
Summary 183
8
Publishing Projects 185
Technical requirements 185
Publishing web apps 186
Publishing to a folder 187
Publishing to IIS 189
Publishing in Microsoft Azure 193
Publishing .NET MAUI apps 198
Publishing an Android app with .NET MAUI 199
Publishing desktop apps 204
Summary 212
Part 3: GitHub Integration and Extensions
9
Implementing Git Integration 215
Technical requirements 215
Getting started with Git settings 216
Creating a Git repository 219
Cloning a Git repository 222
Fetching, pulling, and pushing
Git repositories 225
Fetching repositories 226
Pulling repositories 229
Pushing to repositories 230
Managing branches 233
Viewing changes in repositories 235
Linking GitHub issues 238
Summary 241
10
Sharing Code with Live Share 243
Technical requirements 243
Understanding Live Share 244
Using Live Share 244
Performing live editing 250
Sharing a terminal with
other collaborators 253
Summary 255
11
Working with Extensions in Visual Studio 257
Technical requirements 257
Working with the Extensions tool 258
Searching for and installing
extensions 259
Reviewing VS Marketplace 263
Setting up extensions 266
Creating a simple VS 2022 extension 267
Summary 275
12
Using Popular Extensions 277
Technical requirements 277
Using HTML Snippet Pack 277
Cleaning up code with CodeMaid 280
Compiling web libraries with
Web Compiler 283
Identifying white spaces with
Indent Guides 285
Optimizing images with
Image Optimizer 285
Highlighting messages in the Output
window with VSColorOutput64 287
Managing .resx files easily
with ResXManager 290
Summary 294
13
Learning Keyboard Shortcuts 295
Technical requirements 295
Shortcuts for use in source code 296
Shortcuts for searching and navigating
source code 296
Shortcuts for editing and refactoring 297
Shortcuts for debugging and testing 298
The most common shortcuts for use
in the IDE 299
Creating custom shortcuts 300
Farewell 303
Index 305
Other Books You May Enjoy 312