<p><p>Learn the extensibility model of Visual Studio to enhance the Visual Studio integrated development environment (IDE). This book will cover every aspect, starting from developing an extension to publishing it and making it available to the end user. </p> The book begins with an introduction to
Visual Studio Extensibility Development: Extending Visual Studio Ide for Productivity, Quality, Tooling, and Analysis
✍ Scribed by Rishabh Verma
- Publisher
- Apress
- Year
- 2020
- Tongue
- English
- Leaves
- 433
- Edition
- 1
- Category
- Library
No coin nor oath required. For personal study only.
✦ Synopsis
Learn the extensibility model of Visual Studio to enhance the Visual Studio integrated development environment (IDE). This book will cover every aspect, starting from developing an extension to publishing it and making it available to the end user.
The book begins with an introduction to the basic concepts of Visual Studio including data structures and design patterns and moves forward with the fundamentals of the VS extensibility model. Here you will learn how to work on Roslyn - the .NET compiler platform - and load extensions in VS. Next, you will go through the extensibility model and see how various extensions, such as menus, commands, and tool windows, can be plugged into VS. Moving forward, youll cover developing VS extensions and configuring them, along with demonstrations on customizing extension by developing option pages. Further, you will learn to create custom code snippets and use a debugger visualizer. Next, you will go through creation of project and item templates including deployment of VS extensions using continuous integration (CI). Finally, you will learn tips and tricks for Visual Studio and its extensibility and integration with Azure DevOps.
After reading Visual Studio Extensibility Development you will be able to develop, deploy, and customize extensions in Visual Studio IDE.
What You Will Learn
- Discover the Visual Studio extensibility and automation model
- Code Visual Studio extensions from scratch
- Customize extensions by developing a tools option page for them
- Create project templates, item templates, and code snippets.
- Work with code generation using T4 templates
- Code analysis and refactoring using Roslyn analyzers
- Create and deploy a private extension gallery and upload the extensions
- Upload a VS extension using CI
- Ship your extension to Visual Studio Marketplace
✦ Table of Contents
Table of Contents
About the Author
About the Technical Reviewers
Acknowledgments
Introduction
Chapter 1: Basics Primer
Why Should I Extend Visual Studio?
Compiler
What Is an SDK (Software Development Kit)?
Recap of Tree Data Structure
Managed Extensibility Framework (MEF)
XML and JSON
Serialization and Deserialization
Revisiting Visitor, Abstract Factory, and Factory Design Patterns
Design Pattern
Factory Design Pattern
Abstract Factory
Visitor Pattern
MSBuild Basics
What Is Code Compilation?
What Happens When We Say That We’re Building the Code?
How Do We Use MSBuild in Visual Studio?
Async Await
.NET Compiler Platform (Roslyn)
Summary
Chapter 2: Getting Started
Creating Your First Visual Studio 2019 Extension
Open Packaging Convention
VSIX
Grokking the Structure of a Boilerplate Extension
VSIXAnatomyPackage.cs File
Source.extension.vsixmanifest File
References
Properties
Anatomy of Extension
Examining the Files
[Content_Types].xml
Catalog.json
DumpExtensions.dll
Extension.vsixmanifest
Manifest.json
VSIXAnatomy.dll
VSIXAnatomy.pkgdefs
Examining the Other Parts of the Extension
Language Packs
Dependencies and Other References
How Does Visual Studio Discover and Load an Extension?
Summary
Chapter 3: Extending Visual Studio
Know Your IDE – Visual Studio 2019 User Interface
Visual Studio Extensibility Model
Extending Menus and Commands
Tools Menu Extension
Extern
Include
Define
Commands
Menus
Groups
Buttons
Combos
Bitmaps
The Condition Attribute
The VSCT File Continued
Running the Code
The AsyncPackage Abstract Class
FAQs
Summary
Chapter 4: Developing Your First Extensions
Extensions to Aid Development of VS Extensions
Visual Studio Extension to Perform Search
Starting the Extension
Adding the Command to the Menu
Adding an Icon and Keyboard Support
Writing the Search Functionality
Testing the Extension
Tool Window Extension to Show DTE Object
Starting the Extension
Adding a ToolWindowPane
Writing the Extension
Running the Extension
Summary
Class References
DTE
Document Interface
TextSelection
DialogPage
ToolWindowPane
Chapter 5: Developing Real-World Extensions
Visual Studio Extension to Display Infobar
Starting the Infobar Extension
Displaying the Infobar
Writing an Infobar Display Class
Modifying the Event Handler
Running the Extension
Visual Studio Extension to Generate Code
Starting the Code Generating Extension
Generating the Code
Writing the Code Generation Class
Updating the Command Class
Running the Extension
Summary
Class References
Infobar Type System
Code Generation Types
Chapter 6: Developing Real-World Extensions for Visual Studio Editor
Visual Studio Editor
Editor Subsystems
Text Model Subsystem
Text View Subsystem
Classification Subsystem
Operations Subsystem
Editor Features
Tags
Classifier
Adornments
Projection
Outlining
Operations
IntelliSense
Editor Extensibility
Diagnostic Analyzer with Code Fix
Writing a Diagnostic Code Analyzer with Code Fix
Setting Up the Project
SupportedDiagnostics
Initialize
Coding the Diagnostic Analyzer
Running the Diagnostic Analyzer
Writing a Code Fix
Testing the Extension
Distributing the Extension
Code Refactoring Extension
Coding the Extension
Testing the Refactoring
IntelliSense
IntelliCode
Summary
Class References
Text Model Subsystem
Content Types
Text View Types
Diagnostic Analyzer
AnalysisContext
Chapter 7: Snippets, Templates, and More …
Code Snippets
Anatomy of a Code Snippet
Developing and Distributing Code Snippets
Project and Item Templates
Connected Services
Debugging
Summary
Chapter 8: Continuous Integration and Hosting
Visual Studio Marketplace
Publishing Extension to Visual Studio Marketplace
Continuous Integration and Continuous Deployment
Private Galleries
Anatomy of a Private Gallery
Creating Private Galleries
Consuming Private Galleries
Summary
Chapter 9: Tips and Tricks
Tips and Tricks
VSIXManifest Metadata Values
Name and Description
License
Tags
Correct Target Version
Packaging and Updating the Extension
Use Extensibility Essentials 2019 Extension
Find or Assign Keyboard Shortcut to Commands
Import Visual Studio 2017 Extensions into Visual Studio 2019
Research VS Commands
Run a Command
Make Use of KnownImageMonikers
Coding Is Easier with IntelliCode
Async Package and Background Loading
Use Async All the Way
Make Use of Analyzers
Get a Service
Provide a Service
Make Use of Options Page
Localize the Extension
InstalledProductRegistration Attribute
Consider to Make Use of Ngen for Better Performance
Reset Experimental Instance
Rule-Based UI Context
Use Syntax Visualizer
Look at Sample Extensions
Add Sound Effects
Extensibility Logs
Digitally Sign Your Extension
Create a VS Extension Pack
User Experience Guidelines
Use the Checklist
Visual Studio Performance Manager
Measure the Performance Impact of Your Extension on Visual Studio
Live Code Share
Quick Launch/ Search
Close Tool Window
Use EditorConfig File
Peek Definition
Customize Scrollbar
Conditional Breakpoints, Tracepoints, and Data Breakpoints
Code Editing Shortcuts
Make Use of Snippets
Make Use of Code Map
Use IntelliTest to Write and Maintain Better Tests
Programmatically Attach or Break the Debugger in Your Code
C# Interactive Window
Paste Special for XML and JSON
Share Feedback with Microsoft
Ask the Experts
Visual Studio YouTube Channel
Tips on Twitter
Subscribe to Blogs
Visual Studio Code
Visual Studio 2019 for Mac
Useful Visual Studio 2019 Extensions
Summary
Index
📜 SIMILAR VOLUMES
Master Visual Studio extensibility for an enhanced Visual Studio IDE experience. This book is a comprehensive guide that covers every facet of developing, debugging, and publishing extensions that amplify your productivity, tooling, and analysis within the Visual Studio IDE. This new edition is u
Whether you want to integrate optimized builds, enhanced programming tools, or other rapid application development features, this unique resource shows you how to develop customized extensions. After a quick introduction of basic concepts, this book delves into the automation model and add-in develo
This is a hands-on guide that provides exemplary coverage of all the features and concepts related to PTVS. The book is intended for developers who are aiming to enhance their productivity in Python projects with automation tools that Visual Studio provides for the .Net community. Some basic knowled
Leverage the power of the Visual Studio IDE to develop better and more efficient Python projects Overview Learn how you can take advantage of IDE for debugging and testing Python applications Enhance your efficiency in Django development with Visual Studio IntelliSense Venture into the depths of Pyt
Python Tools for Visual Studio is a free and open source plugin for Visual Studio from Microsoft. It enables developers to use all the major productivity features of Visual Studio in their projects. The powerful integrated code navigation and code completion tools (IntelliSense) in PTVS empower deve