How does VisualStudio develop plug-ins?

0 Preface

  The use of Visual Studio plug-ins can greatly improve development efficiency, provide a better integrated environment, enrich and expand the ecosystem, facilitate debugging and troubleshooting, and provide visual design and modeling functions. These benefits help developers complete projects more quickly and efficiently, and provide a better user experience. This article records the process of developing plug-ins in VisualStudio.

1. Tool preparation

  Install VS2022, search for the "Visual Studio2022" installation package in browsers such as Baidu, and then install it.
  Installing VS requires two SDK workloads: .NET desktop development and Visual Studio extension development.
  insert image description here

2. Create a plugin project (VSIX)

  insert image description here

3. Custom VSIX properties

  insert image description here

4. Create a command command

  insert image description here

5. Set the command name

  insert image description here

<ButtonText>Invoke Command2</ButtonText>

6. Write command function

  insert image description here

System.Windows.Forms.MessageBox.Show("Hello, VSIX!");

7. Debug plugin

  (1) Start debugging
  insert image description here

  (2) View function
  insert image description here

8. Install the plugin

  (1) View the location where the plug-in is generated
  insert image description here

  (2) Install VSIXProject2.vsix
  insert image description here

  (3) Close VS2022 and restart to check the function
  insert image description here

References:
[1] Code Construction Works. Visual Studio Extension Development (VS Plugin) ; 2021-08-22 [accessed 2023-07-21].
[2] MT_GH. VS Plugin Development (1) ; 2022-06-23 [accessed 2023-07-21].
[3] clever101. Write a VS plug-in by yourself (1) ; 2013-03-28 [accessed 2023-07-21].
[4] AI2 Chinese Network. Basic development of VS Addin plug-in Getting Started ; 2015-07-31 [accessed 2023-07-21].
[5] The feeling of snow mountain flying fox. Write a VS plug-in by yourself ; 2018-11-08 [accessed 2023-07-21].
[6] " Canceled". Visual Studio plug-in development (1) - how to start VSX development ; 2014-03-08 [accessed 2023-07-21].
[7] Mai Xiaoyu. VS plug-in development - personalized VS IDE editor, Instantly tall ; 2016-08-16 [accessed 2023-07-21].

Guess you like

Origin blog.csdn.net/qq_40640910/article/details/131853462