Article directory
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.
2. Create a plugin project (VSIX)
3. Custom VSIX properties
4. Create a command command
5. Set the command name
<ButtonText>Invoke Command2</ButtonText>
6. Write command function
System.Windows.Forms.MessageBox.Show("Hello, VSIX!");
7. Debug plugin
(1) Start debugging
(2) View function
8. Install the plugin
(1) View the location where the plug-in is generated
(2) Install VSIXProject2.vsix
(3) Close VS2022 and restart to check the function
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].