![](/user_photo/_userpic.png)
- •Table of Contents
- •About the Author
- •About the Technical Reviewer
- •Acknowledgments
- •Introduction
- •Installing Visual Studio
- •Visual Studio 2022 System Requirements
- •Operating Systems
- •Hardware
- •Supported Languages
- •Additional Notes
- •Visual Studio Is 64-Bit
- •Full .NET 6.0 Support
- •Using Workloads
- •The Solution Explorer
- •Toolbox
- •The Code Editor
- •New Razor Editor
- •What’s Available?
- •Hot Reload
- •Navigating Code
- •Navigate Forward and Backward Commands
- •Navigation Bar
- •Find All References
- •Find Files Faster
- •Reference Highlighting
- •Peek Definition
- •Subword Navigation
- •Features and Productivity Tips
- •Track Active Item in Solution Explorer
- •Hidden Editor Context Menu
- •Open in File Explorer
- •Finding Keyboard Shortcut Mappings
- •Clipboard History
- •Go To Window
- •Navigate to Last Edit Location
- •Multi-caret Editing
- •Sync Namespaces to Match Your Folder Structure
- •Paste JSON As Classes
- •Enable Code Cleanup on Save
- •Add Missing Using on Paste
- •Features in Visual Studio 2022
- •Visual Studio Search
- •Solution Filters
- •Visual Studio IntelliCode
- •Whole Line Completions
- •Visual Studio Live Share
- •Summary
- •Visual Studio Project Types
- •Various Project Templates
- •Console Applications
- •Windows Forms Application
- •Windows Service
- •Web Applications
- •Class Library
- •MAUI
- •Creating a MAUI Application
- •Pairing to Mac for iOS Development
- •Consuming REST Services in MAUI
- •The Complete Weather App
- •The Target Platforms
- •The Required NuGet Package
- •The Weather Models
- •The WeatherService
- •The MainViewModel
- •Registering Dependencies
- •Building the MainPage View
- •Using SQLite in a MAUI Application
- •The ToDoItem Model
- •The ToDoService
- •The MainViewModel
- •Registering Dependencies
- •Building the MainPage View
- •Managing NuGet Packages
- •Using NuGet in Visual Studio
- •Hosting Your Own NuGet Feeds
- •Managing nmp Packages
- •Creating Project Templates
- •Creating and Using Code Snippets
- •Creating Code Snippets
- •Using Bookmarks and Code Shortcuts
- •Bookmarks
- •Code Shortcuts
- •Adding Custom Tokens
- •The Server Explorer
- •Running SQL Queries
- •Visual Studio Windows
- •C# Interactive
- •Code Metrics Results
- •Maintainability Index
- •Cyclomatic Complexity
- •Class Coupling
- •Send Feedback
- •Personalizing Visual Studio
- •Adjust Line Spacing
- •Document Management Customizations
- •The Document Close Button
- •Modify the Dirty Indicator
- •Show Invisible Tabs in Italics in the Tab Drop-Down
- •Colorize Document Tabs
- •Tab Placement
- •Visual Studio Themes
- •Summary
- •Setting a Breakpoint
- •Step into Specific
- •Run to Click
- •Run to Cursor
- •Force Run to Cursor
- •Conditional Breakpoints and Actions
- •Temporary Breakpoints
- •Dependent Breakpoints
- •Dragging Breakpoints
- •Manage Breakpoints with Labels
- •Exporting Breakpoints
- •Using DataTips
- •Visualizing Complex Data Types
- •Bonus Tip
- •Using the Watch Window
- •The DebuggerDisplay Attribute
- •Evaluate Functions Without Side Effects
- •Format Specifiers
- •dynamic
- •hidden
- •results
- •Diagnostic Tools
- •CPU Usage
- •Memory Usage
- •The Events View
- •The Right Tool for the Right Project Type
- •Immediate Window
- •Attaching to a Running Process
- •Attach to a Remote Process
- •Remote Debugger Port Assignments
- •Remote Debugging
- •System Requirements
- •Download and Install Remote Tools
- •Running Remote Tools
- •Start Remote Debugging
- •Summary
- •Creating and Running Unit Tests
- •Create and Run a Test Playlist
- •Testing Timeouts
- •Using Live Unit Tests
- •Using IntelliTest to Generate Unit Tests
- •Focus IntelliTest Code Exploration
- •How to Measure Code Coverage in Visual Studio
- •Summary
- •Create a GitHub Account
- •Create and Clone a Repository
- •Create a Branch from Your Code
- •Creating and Handling Pull Requests
- •Multi-repo Support
- •Compare Branches
- •Check Out Commit
- •Line Staging
- •Summary
- •Index
![](/html/75672/2303/html_f2T7Z5fZIC.jwa_/htmlconvd-c6PX3n259x1.jpg)
Chapter 5 Source Control
Create a GitHub Account
Let’s start off with creating a GitHub account. Point your browser to www.github.com, as shown in Figure 5-1, and create an account by clicking the signup button.
Figure 5-1. Sign up for GitHub
Enter a username (Figure 5-1), email address, and password. GitHub then checks your password to verify that it does not appear on a list of known compromised passwords. If all checks out, a confirmation code is sent to your email address. After verifying your email address, GitHub will take you through a short personalization process before finally offering you an option to sign up for the Team account or continuing with the free account.
After entering your details, you will be taken to your dashboard. You can continue using the free account, but there is also the option to upgrade to a Pro account. The free subscription offers the basics suitable for most developers, while the pro subscription offers several more features. The free subscription is very generous and will appeal to most developers. The free subscription includes the following, among others:
246
![](/html/75672/2303/html_f2T7Z5fZIC.jwa_/htmlconvd-c6PX3n260x1.jpg)
|
Chapter 5 Source Control |
•\ |
Unlimited public and private repositories |
•\ |
Three collaborators for private repositories |
•\ |
Issues |
•\ |
Project tables and boards |
•\ |
Pages and wikis for public repos |
•\ |
GitHub Actions (2000 minutes/month) or free for public repos |
The pro subscription, on the other hand, offers more which includes |
|
•\ |
Unlimited public and private repositories |
•\ |
Unlimited collaborators |
•\ |
Issues |
•\ |
Project tables and boards |
•\ |
Repository insights |
•\ |
Automatic code review assignment |
•\ |
GitHub Actions (3000 minutes/month) or free for public repos |
GitHub Team on the other hand allows a team of developers to collaborate on projects, and GitHub bills for GitHub Team on a per-user basis.
For more info on all GitHub’s products, browse to the following URL: https://docs.github.com/en/get-started/learning-about-github/ githubs-products.
After creating your account on GitHub, you will be sent a welcome email with additional information and links to get you started. GitHub uses repositories to store your code, and you would create a repository for each project you want to work on. Clicking the Create repository button will take you to the Create a new repository page. If not, you can access your repositories from the menu under your profile image. This will take you to your repositories page from where you can create your first repository as seen in Figure 5-2.
247