Dirk Strauss

Getting Started with Visual Studio 2022

Learning and Implementing New Features

2nd ed.
Dirk Strauss
Uitenhage, South Africa
ISBN 978-1-4842-8921-1e-ISBN 978-1-4842-8922-8
© Dirk Strauss 2020, 2023
This work is subject to copyright. All rights are solely and exclusively licensed by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed.
The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use.
The publisher, the authors, and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, expressed or implied, with respect to the material contained herein or for any errors or omissions that may have been made. The publisher remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

This Apress imprint is published by the registered company APress Media, LLC, part of Springer Nature.

The registered company address is: 1 New York Plaza, New York, NY 10004, U.S.A.

To Adele, Tristan, and Irénéé. My everything for you, always!

Introduction

Visual Studio 2022 is the next version of the stellar development tool we love to use. This book is for developers ready to get to know the IDE better. It aims to get you started on the road to exploring Visual Studio 2022, beyond what you are already comfortable with.

The book starts with installing Visual Studio and adding workloads. Then you explore the IDE a bit more before looking at the existing (and some new) features in Visual Studio 2022. After that, a few productivity tips are included for good measure.

Being able to effectively work with different project types and knowing when to use them are explored in a bit more detail in Chapter 2. We will look at the new MAUI project template and how to create cross-platform applications. We then see how to create project templates and then explore using and creating code snippets. This chapter covers many of the basics essential to working with Visual Studio, including using bookmarks, code shortcuts, the Server Explorer, and other Visual Studio Windows.

In Chapter 3, we look at debugging techniques such as using breakpoints, setting conditional breakpoints, breakpoint actions, temporary breakpoints, dependent breakpoints, and labels. We see how to use data tips as well as the DebuggerDisplay attribute. We then take a closer look at Diagnostic Tools and the Immediate Window. Finally, to close off the debugging chapter, we see how to attach to a running process and how to use remote debugging.

The next chapter introduces you to creating and running unit tests. You learn how to create live unit tests, use IntelliTest to generate unit tests, and measure code coverage in Visual Studio.

Finally, we look at working with Git and GitHub. We see how to create a GitHub account and what creating and cloning a repository involves. The new Git features in Visual Studio 2022, such as multi-repo branching, comparing branches, and line staging, are also discussed.

You learn how to commit changes in code to the repository and create a branch of your code when you need to work on a new feature in isolation. Then we look at creating a pull request and how these pull requests are managed. Lastly, we have a look at the benefit of working with stashes.

If you need an excellent reference book that deals exclusively with (and only with) Visual Studio, then look at what this book has to offer you. If you spend any time using Visual Studio or want to learn how working with Visual Studio 2022 can increase your productivity, then this book makes a perfect reference book for your office.

Acknowledgments

I would like to thank my wife and children for their support while writing this book. I would not have been able to do it without you by my side.

I would also like to thank the Apress team for supporting this book and for turning my vision into reality. It is a topic I have wanted to write about for a long time.

I also want to thank Sanjaya Prakash for his help during the review of this book.

Last but not least, I want to thank you for reading this book. Your passion for knowing more drives me to learn more and impart what I learn. It’s a symbiotic relationship that benefits us as we grow and become better at what we do.

Table of Contents
About the Author
Dirk Strauss

A photograph of Dirk Strauss.

has over 17 years of experience programming with C# and Visual Studio. Working for various companies throughout his career, he has been privileged to work with and learn from some of the most brilliant developers in the industry. He has authored several books on topics ranging from Visual Studio and C# to ASP.NET Core. Passionate about writing code, he loves learning new tech and imparting what he learns to others.
 
About the Technical Reviewer
Sanjaya Prakash Pradhan

A photograph of Sanjaya Prakash Pradhan.

is a Microsoft Dynamics 365 and Power Apps Business Applications MVP and, at the same time, a Microsoft Certified Trainer (MCT) in Dynamics 365 CE and Power Apps. He is an experienced senior technical consultant with 13+ years of experience in consulting and training who has worked on numerous business system implementations. Sanjaya is currently working as the research and development industry solutions lead in an established worldwide business applications practice. Having led software projects in numerous industries including BFS, health care, retail, and the public sector, he works across all areas of the project life cycle from demonstrations, design, architecture, documentation, customization, and development. Sanjaya gets involved in the technical community through leading the Power Platform and Dynamics 365 user group in India, running technical events, and presenting on technical and functional topics at conferences around the world. In one line, he is an MVP, MCT, community director, UG lead, speaker, trainer, blogger, author, podcaster, business advisor, and senior solution architect.
 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.46.58