visual-studio-extensions

Update Private Gallery atom such that VS shows that an extension update is available

六月ゝ 毕业季﹏ 提交于 2019-12-20 09:55:47
问题 I'm using a Visual Studio Private Gallery to publish a VSIX internal to my company. My VSIX shows up in the "Online" section of "Extensions and Updates" in Visual Studio 2012 and I can install it from there: However, once it's installed, I can't figure out how to update my extension in a way that makes it show up in the "Updates" section of that same dialog box, nor can I figure out how to make Visual Studio notify me that an update is available. I've tried various combinations of the

Extension for Visual studio unknown error - unable to push or fetch anything

偶尔善良 提交于 2019-12-20 09:47:10
问题 I have an error when I try to push anything to my bitbucket repository via Git extension for visual studio: Error encountered while pushing branch to the remote repository: Git failed with a fatal error. HttpRequestException encountered. An error occurred while sending the request. cannot spawn /C/Program Files (x86)/Microsoft Visual Studio/2017/Community/Common7/IDE/CommonExtensions/Microsoft/TeamFoundation/Team Explorer/Git/mingw32/libexec/git-core/git-askpass.exe: No such file or directory

How to register my service as a global service or how can I use MEF in my scenario?

筅森魡賤 提交于 2019-12-20 07:33:09
问题 I would like to create my own service with global visibility. To implement that, I followed this sample solution. Everything goes well, I can call my service within a class, which extends from the Package abstract class, in this way: public class ClientPackage : Package { private void GetGlobalServiceCallback(object sender, EventArgs args) { IMyGlobalService service = GetService(typeof(SMyGlobalService)) as IMyGlobalService; } } Because I'm in a Package, I can easily call GetService and I can

How to programmatically open Visual Studio Tools->Options dialog on a specific page?

和自甴很熟 提交于 2019-12-20 05:14:36
问题 I am writing a Visual Studio extension and I need to programmatically open the Tools->Options dialog on a specific page. I could find how to open the dialog on the default page: var editor = (my_package as System.IServiceProvider).GetService(typeof(DTE)) as DTE2; editor.ExecuteCommand("Tools.Options"); I have found that I can pass some parameter after the command name. But passing the specific page name I want does not seem to do the trick. Is it even possible to open a specific page? Is

WPF modal window in Visual Studio Extension blocking input

落爺英雄遲暮 提交于 2019-12-20 04:09:10
问题 Using the following tutorial, within a VSIX project, I created a WPF window that inherits from Microsoft.VisualStudio.PlatformUI.DialogWindow, and I display this modally using the following code: var myWindow = new MyWindow(myParameters); myWindow.ShowDialog(); When I compile this in RELEASE mode and start without debugging [Ctrl+F5], it opens the Experimental version of Visual Studio. Here, I open another Solution and then execute my Modal Window. The window works just fine - I can type in

PowerShell Script to Create Visual Studio Project Template Extension Zip Issue

六月ゝ 毕业季﹏ 提交于 2019-12-20 01:05:43
问题 I'm trying to write a PowerShell script to write a Visual Studio extension which will simply add a project template. Here is a trimmed down version of the script to demonstrate the problem: # Add the assemblies Add-Type -Assembly System.IO.Compression.FileSystem # Create temporary directories for the zip archives [System.IO.Directory]::CreateDirectory("Extension") [System.IO.Directory]::CreateDirectory("Template") # Build up the contents of the template file $templateContent = "<?xml version=

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

VSIX Project Context Menu

妖精的绣舞 提交于 2019-12-19 09:26:34
问题 I'm trying to create a Visual Studio 2017 extension, just for fun and to learn how VS extensibility works. My extension must be usable from the Solution Explorer tab as a context menu button, but I would like to include it at a menu level that isn't root. My goal is to put it in the "Add" sub-menu, but at the moment I'm only able to put it at root level (when you right-click the Project item, the menu entry is shown as the last of the context menu control). How can I move it under the "Add"

Event when a Document Window is focus in Visual Studio

邮差的信 提交于 2019-12-19 07:45:10
问题 I have an extensibility project in Visual Studio and I need to use the event triggered when I change from one window to another in the visual studio editor, my problem: I created a Tool Window that display some diagram, that diagram depend of an editable file, when I save the editable file my tool window updates the information, but when there is more than one editable file opened and I switch between them I want that the tool window updates the information as well. So: I want to get the

How do I subscribe to solution and project events from a VSPackage

徘徊边缘 提交于 2019-12-18 11:47:54
问题 I'm developing a language service for Visual Studio through a VSPackage. I need to update my parse data whenever files get added/removed from the solution's projects. I want to subscribe to solution and project events. I tried as follows, but none of these events get fired when I add/remove projects to the solution or add/remove items to projects. DTE dte = (DTE)languageService.GetService(typeof(DTE)); if (dte == null) return; ((Events2)dte.Events).SolutionEvents.ProjectAdded +=