vs-extensibility

How do you install a Visual Studio 2017 Extension (VSIX) from an MSI

*爱你&永不变心* 提交于 2019-12-10 13:42:31
问题 Visual Studio 2017 seems to have changed a lot of things in the extensibility area https://docs.microsoft.com/en-us/visualstudio/extensibility/breaking-changes-2017 The previous recommendations regarding installing a VSIX from an MSI now seem obsolete (Deploying VSIX using MSI installer), but there seems to no information about how to do it now. The VS2017 FAQ implies the VSIX installer can (should?) be kicked off manually, is this the recommender approach now? vsixinstaller.exe /q

In a Visual Studio Extension, how to detect when the debugger Continues

萝らか妹 提交于 2019-12-09 11:12:25
问题 I need my Visual Studio extension to react to debugging events. I've registered a IDebugEventCallback2 and I'm receiving events, but all I get for each event is an opaque IDebugEvent2 and a Guid, many of which are not only undocumented but don't appear anywhere on the web (or in my registry). My specific requirement at the moment is to know when the process is Continued - ie. the user has hit Continue, Run to cursor, etc. What Guid should I be looking for? Or is there some other event family

Visual Studio SDK - How to add a margin glyph on command invoked?

和自甴很熟 提交于 2019-12-07 23:14:02
问题 How can I modify this sample: https://msdn.microsoft.com/en-us/library/ee361745.aspx to have glyphs added to the margin when a button I added is clicked? I have a button which creates a special kind of breakpoint. I would like this kind to be recognized by my own margin glyph. So I wrote the GetTags method in my Tagger class as follows: IEnumerable<ITagSpan<MyBreakpointTag>> ITagger<MyBreakpointTag>.GetTags(NormalizedSnapshotSpanCollection spans) { if (BreakpointManager != null) { DTE2 ide =

How to Unit Test Visual Studio AddIn interacting with VS DOM

偶尔善良 提交于 2019-12-07 16:44:23
问题 I have developed a Visual Studio Add-In which interacts with the Visual Studio DOM and amends the loaded solution. While I have endevoured to seperate the code which interacts with the DOM and can unit test the other business logic via unit tests, is there a way to unit test the VS DOM interaction functionality and the Add-In initialisation code which adds custom menu items to Visaual Studio? 回答1: This may go some way to answer this... I've got a code sample to create a DTE VS instance which

Is there an event triggered when dte.Solution.SolutionBuild.StartupProjects changes?

前提是你 提交于 2019-12-07 08:00:33
问题 I am building a visual studio 2010 Add-in for internal use in my company. I would like to customize the main window caption to display the name of the current start up project. I can set the caption of the main window with the following code: DTE d = GlobalClass.dte2 as DTE; IntPtr hWnd = new System.IntPtr(d.MainWindow.HWnd); if (d.Solution.SolutionBuild.StartupProjects != null) { object[] sStartUpProject = (object[])d.Solution.SolutionBuild.StartupProjects; string Caption = d.MainWindow

Visual Studio 2010 Extensibility, MPF and language services

主宰稳场 提交于 2019-12-07 00:13:25
问题 I am trying to extend Visual Studio 2010 RC to be able to use a custom programming language. The first two things I've tried to do is a syntax highlight/Intellisense feature (easily done, thanks to "Ook!" sample from PDC09) and a possibility to create new project templates (i.e. be able to open *.myproj files). For this second task, I can't find any easy tutorials or samples. Most samples are for Visual Studio 2008 (as for IronPython integration) or even VS2003. The few samples available for

How to Unit Test Visual Studio AddIn interacting with VS DOM

ぐ巨炮叔叔 提交于 2019-12-05 23:00:54
I have developed a Visual Studio Add-In which interacts with the Visual Studio DOM and amends the loaded solution. While I have endevoured to seperate the code which interacts with the DOM and can unit test the other business logic via unit tests, is there a way to unit test the VS DOM interaction functionality and the Add-In initialisation code which adds custom menu items to Visaual Studio? This may go some way to answer this... I've got a code sample to create a DTE VS instance which i'm hoping I can then use in my unit test to inject into my class, which interacts with VS, and then

How to register key binding code on VSIX package installation

不想你离开。 提交于 2019-12-05 20:11:39
I'd like to add keyboard shortcut to Visual Studio package only once, during its installation. Basically I know how to do it from the package code, for example: var dte = GetGlobalService(typeof(DTE)) as DTE2; if (dte != null) { dte.Commands.Item("Tools.Something").Bindings = "Global::Ctrl+T, Ctrl+S"; } The problem is, I'd like to invoke this code only once (I don't want to execute this code in package class constructor, because it will execute each time the package will be used first time after VS restart). How to do it ? There is another way I wasn't aware last time. All what need to be done

Is there a good way to stream the results from an external process into a Visual Studio output pane?

只谈情不闲聊 提交于 2019-12-05 14:47:36
I have a custom output pane set up in a VsPackage similar to the following: ///-------------------------------------------------------------------------------- /// <summary>This property gets the custom output pane.</summary> ///-------------------------------------------------------------------------------- private Guid _customPaneGuid = Guid.Empty; private IVsOutputWindowPane _customPane = null; private IVsOutputWindowPane customPane { get { if (_customPane == null) { IVsOutputWindow outputWindow = GetService(typeof(SVsOutputWindow)) as IVsOutputWindow; if (outputWindow != null) { // look

Visual Studio 2010 Extensibility, MPF and language services

匆匆过客 提交于 2019-12-05 03:08:34
I am trying to extend Visual Studio 2010 RC to be able to use a custom programming language. The first two things I've tried to do is a syntax highlight/Intellisense feature (easily done, thanks to "Ook!" sample from PDC09) and a possibility to create new project templates (i.e. be able to open *.myproj files). For this second task, I can't find any easy tutorials or samples. Most samples are for Visual Studio 2008 (as for IronPython integration) or even VS2003. The few samples available for VS2010 do not work (including MPFProj) or do not compile, and are too hard to understand. Is there any