Mastering Visual Studio 2019 - Second Edition

Book description

Explore the new features in Visual Studio 2019 and build apps using WPF, .NET Core, TypeScript, and Azure

Key Features

  • Learn how to write better code with the new and improved Visual Studio 2019 toolset
  • Accelerate cloud development with built-in Azure tools
  • Collaborate with a distributed team by integrating Visual Studio with source control repositories

Book Description

Visual Studio 2019 is the latest IDE from Microsoft for developers targeting Windows and other platforms to build stunning desktop, web and mobile applications. In this book, you'll learn how to effectively use this IDE to build, debug, and test your applications to enhance productivity by simplifying your most common tasks and allowing more time to focus on other aspects of your project.

Starting with an overview of the new features in Visual Studio 2019, you'll understand what's improved since its previous edition. This Visual Studio book will help you build applications for Windows using Windows Presentation Foundation (WPF), which provides a unified programming model for developing dynamic, rich, data-driven desktop applications. You'll then learn about Microsoft's implementation of cloud computing with Azure, followed by building applications using .NET Core and TypeScript. This book will also help you explore NuGet, the package manager for the Microsoft development platform, that enables you to create, publish, and consume packages from a central repository by managing a reference list of packages. Finally, you'll delve into the debugging and live unit testing techniques that are built into the IDE.

By the end of the book, you'll have become a more efficient Visual Studio 2019 user, and be able to use it for developing, testing, debugging and deploying your applications.

What you will learn

  • Increase your productivity with Visual Studio 2019's new features
  • Understand how the installation wizard works and create an offline installation package
  • Build stunning applications using WPF, .NET Core, and TypeScript
  • Explore NuGet packages in depth
  • Accelerate cloud development with Azure
  • Debug and test your applications efficiently
  • Get to grips with integrating Visual Studio with Git repositories

Who this book is for

If you're a Microsoft .NET developer who wants to learn the new features of Visual Studio 2019, or want to delve into cloud computing, .NET Core, TypeScript along with mastering the skills of building, debugging, and unit testing professional apps, you'll find this book useful. Basic knowledge of Visual Studio, .NET, and C# is assumed.

Downloading the example code for this ebook: You can download the example code files for this ebook on GitHub at the following link: If you require support please email:

Table of contents

  1. Title Page
  2. Copyright and Credits
    1. Mastering Visual Studio 2019 Second Edition
  3. About Packt
    1. Why subscribe?
  4. Contributors
    1. About the author
    2. About the reviewers
    3. Packt is searching for authors like you
  5. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
      1. Download the example code files
      2. Download the color images
      3. Conventions used
    4. Get in touch
      1. Reviews
  6. Section 1: What's New in Visual Studio 2019?
  7. What's New in the Visual Studio 2019 IDE?
    1. Technical requirements
    2. The Visual Studio 2019 installation experience
      1. Overview of the installation experience
      2. Installing using the online installer
      3. Creating an offline installer for Visual Studio 2019
      4. Installing Visual Studio 2019 from the command line
      5. Modifying your existing Visual Studio 2019 installation
      6. Uninstalling Visual Studio 2019
    3. Overview of the new Start window
      1. Cloning a repository from the Start window
      2. Opening an existing project or solution from the Start window
      3. Opening a local folder from the Start window
      4. Creating a new project from the Start window
    4. Improved search in Visual Studio 2019
    5. Quick actions improvements for code refactoring
      1. Inverting if statements
      2. Wrapping arguments
      3. Unwrapping arguments
      4. Introducing inline variables
      5. Pulling a member to its base type
      6. Adjusting namespaces to match the folder structure
      7. Converting foreach loops into generalized LINQ queries
    6. Visual Studio IntelliCode
      1. Installing the IntelliCode component
      2. Understanding how IntelliCode helps
    7. One-click code cleanup
    8. Clipboard History
    9. Searching in debugging windows
    10. Time Travel Debugging
    11. Live Share
      1. Creating a new live sharing session
      2. Joining an existing live sharing session
      3. Managing a live sharing session
    12. Product Updates
    13. Summary
  8. Section 2: Building and Managing Applications
  9. Building Desktop Applications for Windows Using WPF
    1. Technical requirements
    2. Understanding the WPF architecture
    3. An overview of XAML
      1. The object element syntax
      2. The property attribute syntax
      3. The property element syntax
      4. The content syntax
      5. The collection syntax
      6. The event attribute syntax
    4. Building your first WPF application
      1. Getting started with the WPF project
      2. Understanding the WPF project structure
      3. Getting familiar with XAML Designer
      4. Adding controls in XAML
    5. Exploring layouts in WPF
      1. Using Grid as a WPF panel
      2. Using StackPanel to define the stacked layout
      3. Using Canvas as a panel
      4. Using WPF DockPanel to dock child elements
      5. Using WrapPanel to automatically reposition elements
      6. Using UniformGrid to place elements in uniform cells
    6. The WPF property system
    7. Data binding in WPF
    8. Using converters while data binding
    9. Using triggers in WPF
      1. The property trigger
      2. The MultiTrigger property
      3. The data trigger
      4. The multi data trigger
      5. The event trigger
    10. Summary
  10. Accelerate Cloud Development with Microsoft Azure
    1. Understanding cloud computing basics
      1. IaaS
      2. PaaS
      3. SaaS
    2. Creating your free Azure account
    3. Configuring Visual Studio 2019 for Azure development
    4. Creating an Azure website from the portal
      1. Creating a web application
      2. Creating an App Service plan
    5. Managing Azure websites (web apps) from the portal
    6. Creating an Azure website with Visual Studio 2019
      1. Creating an ASP.NET web application
      2. Publishing the web application to the cloud
    7. Updating an existing Azure website with Visual Studio
    8. Building a mobile app
      1. Creating an Azure mobile app
      2. Preparing your Azure mobile app for data connectivity
      3. Adding a SQL data connection
      4. Creating a SQL database
    9. Integrating the mobile app service in a Windows application
      1. Creating the model and service client
      2. Integrating the API call
    10. Scaling an App Service plan
    11. Summary
  11. Building Applications with .NET Core
    1. Technical requirements
    2. Overview of .NET Core
    3. Installing .NET Core with Visual Studio 2019
    4. A quick lap around .NET Core commands
      1. Creating a .NET Core console app
      2. Creating a .NET Core class library
      3. Creating a solution file and adding projects to it
      4. Resolving dependencies in .NET Core applications
      5. Building a .NET Core project or solution
      6. Running a .NET Core application
      7. Publishing a .NET Core application
        1. FDD
        2. SCD
      8. Creating an ASP.NET Core application
      9. Creating a unit testing project
    5. Creating .NET Core applications using Visual Studio 2019
    6. Publishing .NET Core applications using Visual Studio 2019
      1. FDD
      2. SCD
    7. Creating, building, and publishing a .NET Core web app to Microsoft Azure
    8. Summary
  12. Web Application Development Using TypeScript
    1. Technical requirements
    2. Setting up the development environment by installing TypeScript
      1. Installing through NPM
      2. Installing through Visual Studio 2019's installer
    3. Building your first Hello TypeScript application
    4. Understanding the TypeScript configuration file
    5. Declaring variables in TypeScript
      1. Declaring variables using the var keyword
        1. Problems with using the var keyword
      2. Declaring variables using the let keyword
      3. Declaring constants using the const keyword
    6. Working with the basic datatypes
      1. Using the number type
      2. Using the string type
      3. Using the bool type
      4. Using the enum type
      5. Using the void type
      6. Using the undefined type
      7. Using the null type
      8. Using the any type to declare a variable
      9. Using the never type
      10. Using the array type
      11. Using the tuple type
    7. Working with classes and interfaces
      1. Defining classes in TypeScript
      2. Initiating an instance of a class
      3. Defining abstract classes in TypeScript
      4. Working with inheritance in TypeScript
      5. Defining interfaces in TypeScript
        1. Classes implementing interfaces
        2. An interface extending another interface
        3. Interfaces extending multiple interfaces
        4. Interfaces extending classes
    8. Summary
  13. Managing NuGet Packages
    1. Technical requirements
    2. Overview of NuGet Package Manager
    3. Creating a NuGet package library for .NET Framework
      1. Creating the metadata in the nuspec file
      2. Building the NuGet package
      3. Building NuGet packages for multiple .NET Frameworks
      4. Building a NuGet package with dependencies
    4. Publishing a NuGet package to the NuGet store
    5. Managing your NuGet packages
    6. Summary
  14. Section 3: Debugging and Testing Applications
  15. Debugging Applications with Visual Studio 2019
    1. Technical requirements
    2. Overview of Visual Studio debugger tools
    3. Debugging C# source code using breakpoints
      1. Organizing breakpoints in code
      2. Debugger execution steps
      3. Adding conditions to breakpoints
        1. Using conditional expressions
        2. Using breakpoint hit counters
        3. Using breakpoint filters
      4. Adding actions to breakpoints
      5. Adding labels to breakpoints
      6. Managing breakpoints using the Breakpoints window
      7. Exporting/importing breakpoints
    4. Using DataTips while debugging
      1. Pinning/unpinning DataTips for better debugging
      2. Inspecting DataTips in various Watch windows
        1. The Autos window
        2. The Locals window
        3. The Watch window
      3. Using visualizers to display complex DataTips
      4. Importing/exporting DataTips
      5. Using the debugger to display debugging information
    5. Using the Immediate Window while debugging your code
    6. Using the Visual Studio Diagnostics Tools
    7. Summary
  16. Live Unit Testing with Visual Studio 2019
    1. Technical requirements
    2. Overview of Live Unit Testing in Visual Studio 2019
      1. Unit testing framework support
      2. Understanding the coverage information shown in the editor
      3. Integration of Live Unit Testing in Test Explorer
    3. Configuring Visual Studio 2019 for Live Unit Testing
      1. Installing the Live Unit Testing component
      2. General settings of Live Unit Testing in Visual Studio
      3. Starting and pausing Live Unit Testing
      4. Including and excluding test methods/projects
    4. Live Unit Testing with Visual Studio 2019
      1. Getting started with configuring the testing project
      2. Understanding the packages.config file
      3. Live Unit Testing with an example
    5. Navigating failed tests
    6. Summary
  17. Section 4: Source Control
  18. Exploring Source Controls in Visual Studio 2019
    1. Technical requirements
    2. Installing Git for Visual Studio 2019
    3. Connecting to the source control servers
    4. Getting started with Git repositories
      1. Creating a new repository
      2. Cloning an existing repository
    5. Working with Git branches
      1. Creating a new local branch
      2. Switching to a different branch
      3. Pushing a local branch to the remote repository
      4. Deleting an existing branch
    6. Working with changes, staging, and commits
      1. Staging changes to your local repository
      2. Committing changes to your local repository
      3. Discarding uncommitted changes
      4. Amending messages to an existing commit
    7. Syncing changes between local and remote repositories
      1. Pushing changes to the remote repository
      2. Fetching changes in the remote repository
      3. Merging changes in the remote repository with your local repository
      4. Resolving merge conflicts
    8. Working with pull requests for a code review
      1. Creating pull requests for a code review
      2. Reviewing an existing pull request
    9. Working with the Git commit history
      1. Rebasing changes to rewrite the commit history
      2. Copying commits using cherry-pick
    10. Undoing your changes
      1. Resetting a local branch to a previous state
      2. Reverting changes from a remote branch
    11. Tagging your commits
    12. Summary
  19. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think

Product information

  • Title: Mastering Visual Studio 2019 - Second Edition
  • Author(s): Kunal Chowdhury
  • Release date: August 2019
  • Publisher(s): Packt Publishing
  • ISBN: 9781789530094