This article is a mirror article of machine translation, please click here to jump to the original article.

View: 65418|Reply: 6

[Source] vs Develop copyright notes plugin [source code]

[Copy link]
Posted on 6/14/2017 10:29:33 AM | | | |


Above is the rendering

Visual Studio.NET plugins can do many things, such as:
1. Write code assistance tools for development environments like CodeRush
2. Write code template tools such as CodeSmith
3. Write a code generator to automatically generate code according to some customized conditions. For example, some of the more popular code generation tools should be more convenient to use if integrated with the development environment.
4. Write a debugging tool such as DataSetPryer, you can view the contents of DataSet during debugging.
5. You can even integrate Google search engine in VS.net, or integrate MSN into VS.Net.
I won't list them all here, but in short, everything that can be related to the Visual Studio.NET development environment can be done in the form of plugins.
There are currently two forms of developing VS.NET plug-ins: one is VS plug-ins generated by VS Wizard; The second is to use Microsoft's VSIP development package (Visual Studio Industry Partner: Microsoft Partner Program). This article discusses the first method.

2. Overview of the procedural framework
Select "New Project × Other Project × Extension Project à Visual Studio.NET Add-on" in the Visual Studio.NET, follow the wizard to generate code, and finally generate two project files, one is the add-in project and the other is the add-in installation project. You can see a connect.cs file in the generated project file in the add-in project, which has the following parts:

1. Inheritance interface of class and its constant definition

public class Connect : Object, Extensibility.IDTExtensibility2, IDTCommandTarget
{…}
The Connect class mainly inherits from two interfaces, one is the Extensibility.IDTExtensibility2 interface, which mainly defines the following methods:
OnAddInsUpdate method: Occurs when an add-in is loaded or uninstalled in the environment.
OnBeginShutdown method: Occurs when the environment is being shut down.
OnConnection method: Occurs when an add-in is loaded into the environment.
OnDisconnection method: Occurs when an add-in is uninstalled from the environment.
OnStartupComplete method: Occurs when the environment finishes starting.

The IDTCommandTarget interface defines the following two methods
Exec method: Called by the VS environment when an external menu command is selected in the VS development environment.
QueryStatus method: Calls this method to query the status of the menu when the VS environment wants to display an external menu.
The method returns the current state of the specified named command, whether it is enabled, disabled, or hidden


The code is as follows:



Finished product download:
Tourists, if you want to see the hidden content of this post, pleaseReply


Source code download:

Tourists, if you want to see the hidden content of this post, pleaseReply


How do I use plugins???

Visual Studio cannot load its own development plugins
http://www.itsvse.com/thread-3506-1-1.html
(Source: Architect)






Previous:js object method, class method, and prototype method are differentiated
Next:AutoMapper type conversion error solution
 Landlord| Posted on 6/14/2017 10:49:47 AM |
Deploy plugins

Copy the finished product to the "C:\Users\Users\Documents\Visual Studio 2013\Addins>" directory, and then unzip it

However, my vs2017 doesn't have this directory C:\Users\Users\Documents\Visual Studio 2017\Addins>

Then, open the Visual Studio > tools menu> option > Environment> Add-ins and Security, and also did not find "Add-ins and Security"

In the end, Baidu found something
Visual Studio add-ins have been deprecated in Visual Studio 2013. You should upgrade the add-in to the extension for VS. For more information about upgrades, see . FAQ: Converting an add-in to a VSPackage extension
Visual Studio can be extended by automating Visual Studio features or by adding your own. The Visual Studio automation model can be used to extend the integrated development environment (IDE).
https://msdn.microsoft.com/zh-cn/library/5abkeks7(v=vs.120).aspx

It is estimated that after VS2013, this thing will not be able to be used, and Microsoft will convert the add-in to the VSPackage extension


Posted on 9/20/2017 1:04:41 PM |
This can be good, where to run
Posted on 7/1/2019 5:44:32 PM |
Want to learn Vs plugin annotation tools
Posted on 1/2/2020 11:38:09 AM |
Support support support.
Posted on 2/4/2020 9:04:27 PM |
Learn and research
Posted on 5/23/2021 9:14:12 PM |
It is convenient to learn how to play
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com