visual-studio-addins

my vs2008 addin for textformatting is awfully slow

倖福魔咒の 提交于 2019-12-22 10:15:03
问题 i wrote a little addin, which does some formatting of my C# code. in the addins Exec method i do the following try { TextSelection selection = (EnvDTE.TextSelection)_applicationObject.ActiveDocument.Selection; String foo = String.Empty; if (!text.IsEmpty) { foo = someCoolObjectThatFormatsText.Format(selection.Text); selection.Text = foo; // here everything gets painfully slow :-( } } catch (Exception) { throw; } when the line with the code "SelectedText.Text = foobar;" is call, VS rebuilds

What is the easiest way to add a Visual Studio 2008 Context Menu Item?

拥有回忆 提交于 2019-12-22 09:45:46
问题 I would like to add a custom menu item when you right-click a certain file extension in Visual Studio. There seem to be some helper open source projects to accomplish this, but I'd like to ask if anyone has ever used them, and how easy were they - and can you help me and provide a starting point? One I've researched is: http://www.codeplex.com/ManagedMenuExtension 回答1: Here's a tutorial that explains how to add a Context Menu Using a Macro instead of creating a Visual Studio Add-in. Hope it

Creating a 'Custom Designer' Visual Studio 2010 Add-in

柔情痞子 提交于 2019-12-20 18:38:28
问题 A major part of our work is creating and manipulating certain XML files, for which have a custom editor. The editor is starting to get creaky and we are looking at building a replacement. Since VS2010 has recently arrived, ostensibly with an improved add-in architecture (MEF?), I am interested in the possibility of building the editor as a custom editor within Visual Studio . It would have to appear in the same way as the code editor or the Designer - a tab item, of which there can be many

Catch WindowTurnedToPage Event in a Visio AddIn project

让人想犯罪 __ 提交于 2019-12-20 07:43:14
问题 I'm trying to execute some code when the user swap between the pages of a visio window. So i tried to catch the WindowTurnedToPage event, but it simply don't work. Other events from his family can be catched, and they respond when they should. But WindowTurnedToPage and BeforeWindowPageTurn don't respond. private void InternalStartup() { this.Startup += new System.EventHandler(ThisAddIn_Startup); this.Shutdown += new System.EventHandler(ThisAddIn_Shutdown); Application.Window

Deployment of Visual Studio Add-in in VS 2012

淺唱寂寞╮ 提交于 2019-12-20 06:40:06
问题 I have created Visual studio add-in successfully.But I am confused to deploy this addin in another computers.I have go throgh the stackoverflow answers.But I did not get clear cut idea about this matter 回答1: You just need to copy YourAddIn.dll and YourAddIn.AddIn files to "c:\Users\username\Documents\Visual Studio 2012\Addins\" folder on another computer. To create an installer you can start with Wix Template For VS2012 Addin Project. 回答2: Deploying an add-in requires to copy the add-in dll(s

Outlook addin: Get elements from a selected calendar

。_饼干妹妹 提交于 2019-12-19 11:48:37
问题 I'm creating an Outlook add-in and i'd like to know how to get elements from a selected calendar? For exemple, i need to get all Appointments items from a calendar named "myCalendar". Now, i can just get all appointments items from ALL calendars. thank you, 回答1: Those extra Calendars are available as subfolders of the main Calendar folder. So here is what you do: Get a reference to the main calendar folder using Outlook.MAPIFolder calendar = Application.Session.GetDefaultFolder(Outlook

Show a Visual Studio Extension Toolbar by default

徘徊边缘 提交于 2019-12-19 10:21:52
问题 In a Visual Studio extension, I have defined a Toolbar in my .vsct file as: <Menu guid="guidVsCmdSet" id="MyToolbar" type="Toolbar" > <CommandFlag>TextChanges</CommandFlag> <CommandFlag>DefaultDocked</CommandFlag> <Strings> <ButtonText>My Tools/ButtonText> </Strings> </Menu> When I launch my extension in Visual Studio Experimental hive, I can open my Toolbar manually via right clicking in the CommandBar area. Is there any way to have the toolbar show up by default when I first run the

Sort selected text from Visual Studio context menu

情到浓时终转凉″ 提交于 2019-12-18 18:33:25
问题 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? 回答1: 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

Visual Studio 2008 Plug-in / Add-in development - Getting Started

丶灬走出姿态 提交于 2019-12-18 11:59:40
问题 hey guys, in relation to this stackoverflow question, how would I go about creating my own Visual Studio 2008 plug-in. I've checked the Visual Studio Developer Centre on MSDN, but the amount of info is overwhelming. There are loads of project types, and I don't even know where to start. Where should I start looking if I want to write something which meets the following requirements: A plug-in that runs like a "service" in Visual Studio, and is able to poll Visual Studio for information, and

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

和自甴很熟 提交于 2019-12-17 23:38:39
问题 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? 回答1: 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