visual-studio-addins

Sort selected text from Visual Studio context menu

人盡茶涼 提交于 2019-11-30 16:47:55
Currently VS has a very useful feature: sort usings (C#). I want the same functionality for any random text, for example - XML nodes in config files. How complex to implement that? VS addin, right? Is it possible to call some VS API which is used for sorting usings? Yurik Just found a good free addon: Menees VS Tools 2012 (or 2010 ver ) - does exactly that and a few more text tricks. There was a few minor negatives when I installed it, but after leaving a comment on the review page it got fixed within days. Waay to go! =) There is a 2017 version now: Menees VS Tools 2017 Edit: Note that this

DTE2 events don't fire

冷暖自知 提交于 2019-11-30 02:44:34
问题 While trying to develop my first VS Addin, I am having issues in firing DTE2 events. Basically, the DocumentOpened and LineChanged events don't fire for some reason. What important part did I miss? namespace TestAddin { public class Connect : IDTExtensibility2 { private AddIn _addInInstance; private DTE2 _applicationObject; public void OnConnection(object application, ext_ConnectMode connectMode, object addInInst, ref Array custom) { _applicationObject = (DTE2) application; _addInInstance =

Visual Studio Add-In - adding a context menu item to solution-explorer

假如想象 提交于 2019-11-29 10:02:54
I'm developing my first add-in for Visual studio and we need to add a context menu item to the solution explorer, that shows up for particular file types only (in our case - ".resx"). I've been googling for 2 days now, unable to find any tutorials or code-samples... Only very basic things like adding a menu-item to the VS "tools" menu etc. Well, you need to create a dynamically visible command that you will make visible only when the selected node in the Solution Explorer is .resx file and then add the command as a child of the Solution Explorer context menu (you would need GUID:ID pair of the

Visual Studio intercepting F1 help command

喜欢而已 提交于 2019-11-29 04:11:39
Im looking to write a visual studio addin that can intercept the default online help command and grab the MSDN library URL when F1 help is called on a class or type. For example say I place my cursor on the keyword string and press F1 it usually automatically opens the browser and navigates to the help documentation for the string reference type. I want to grab the URL passed to the browser before it reaches the browser. Is it possible to write a visual studio addin/extension that can intercept the default F1 help command ?? If the above can be done any pointers as to where to start? About 10

Case preserving find/replace in Visual Studio

北城以北 提交于 2019-11-29 02:16:30
问题 There seems to be no built-in support for case preserving find/replace in VisualStudio (see also a respective feature request). What I mean is: searching for 'BadJob' and replacing with 'GoodJob' would do the following replacements 'badjob' -> 'goodjob' 'BadJob' -> 'GoodJob' 'badJob' -> 'goodJob' 'BADJOB' -> 'GOODJOB' So I am looking for a macro/add-in which implements case preserving find/replace. And if none exists, what is a good starting point to write my own (preferably based on the

Is there a custom language add-in for Visual Studio 2012 / VS11?

荒凉一梦 提交于 2019-11-29 00:38:43
Well I want to add support for the PAWN language to Visual Studio 2012. But because of the lack of experience and lack of tutorials/add-ins which I can edit it's really a difficult task. For now I only want to add the filetypes and compiler, no need for intellisense and for syntax highlighting the C syntax highlighter can be used. I know there is the OOK Language implementation and Boo Language but those add-ins are for VS2010 and won't compile for VS2012. How would I accomplish this? Is there a language add-in (for VS2012) which I can edit/use as base/ use as example? My last attempt resulted

“Visual Studio Integration Package” vs “Visual Studio Add-in”: what is the difference?

做~自己de王妃 提交于 2019-11-28 21:07:20
When creating a new extension for visual studio, there are two project options: "Visual Studio Integration Package" and "Visual Studio Add-in". What is the difference between the two project types and when would you use one over the other? Ok, you can find a full detailed comparison here (there are also links to the previous parts in the series). But basically, add-ins were available as the VS extension type from the very first versions of the VS and built as the COM components. Later on, some limitations were discovered in that approach, so the new extensibility feature was created -- namely

How to acquire DTE object instance in a VS package project?

依然范特西╮ 提交于 2019-11-28 06:32:35
问题 How can I get DTE instance in a VS package project? It's straigtforward in addin project since application is being passed as an argument to onConnection method, but it is unclear how to get it in a package. 回答1: From your main Package class: EnvDTE80.DTE2 dte = this.GetService(typeof(Microsoft.VisualStudio.Shell.Interop.SDTE)) as EnvDTE80.DTE2; 回答2: You can get a null instance getting the SDTE service if the shell is not fully initialized. See how to handle that in this code sample: HOWTO:

Visual Studio intercepting F1 help command

断了今生、忘了曾经 提交于 2019-11-27 18:04:39
问题 Im looking to write a visual studio addin that can intercept the default online help command and grab the MSDN library URL when F1 help is called on a class or type. For example say I place my cursor on the keyword string and press F1 it usually automatically opens the browser and navigates to the help documentation for the string reference type. I want to grab the URL passed to the browser before it reaches the browser. Is it possible to write a visual studio addin/extension that can

Visual Studio 2010 addin writing articles/tutorials? [closed]

荒凉一梦 提交于 2019-11-27 17:12:57
Does anyone know of some good articles / tutorials on writing addins/plugins for Visual Studio 2010? John Saunders Getting Started with Extending Visual Studio The Visual Studio SDK for 2010 The VS2010 beta forums Visual Studio 2010 New Features, Extensibility Points and Partner Opportunities Most of the information on add-ins is in the SDK. Here's the new Visual Studio 10 extensibility samples 6th July 2009 Sample - VSIX MEF Component Project Template added 7th July 2009 Sample - MEF Container added 10th July 2009 Sample - VS Package MEF Container Project Template added 15th July 2009 Sample