vsix

How to include a Nuget package in a Visual Studio Extension (vsix)

爷,独闯天下 提交于 2019-12-12 15:25:42
问题 I have created a Visual Studio Extension (VSIX) that makes changes to our Application's code using Roslyn. The VSIX solution includes the NUGET package Microsoft.CodeAnalysis.Analyzers. As an aside, it is described as version 1.3.2, but the underlying DLLs (e.g. "Microsoft.CodeAnalysis.CSharp.dll") all report to be 1.3.2. Anyhow, I put this on our local private Gallery. From there, I can add it to Visual Studio (VS2015 Update 3) and it executes as expected. However, after my colleagues add it

VS Extension: TextPoint.GreaterThan / LessThan very slow for large files

帅比萌擦擦* 提交于 2019-12-12 10:47:49
问题 I'm working on a VS Extension that needs to be aware of which class member the text-cursor is currently located in (methods, properties, etc). It also needs an awareness of the parents (e.g. class, nested classes, etc). It needs to know the type, name, and line number of the member or class. When I say "Type" I mean "method" or "property" not necessarily a ".NET Type". Currently I have it working with this code here: public static class CodeElementHelper { public static CodeElement[]

How to make a shortcut to run a VSIX method?

心已入冬 提交于 2019-12-12 08:15:57
问题 please see this question. The initial question was solved, and I have a method in my extension. I want that when the user installs the extension, a keyboard-shortcut should be installed as well, and should run the method when pressed. How do I do this? 回答1: You can add shortcuts to the .vsct file. This file is created automatically in the wizard when you generate a new extension and say it will have a menu command. To add it manually: Create MyCommands.vsct Set File Properties to VSCTCompile

How can I match Visual Studio's theme when creating a VSIX tool window?

可紊 提交于 2019-12-12 08:10:27
问题 I am creating an extension for Visual Studio (2012+) that involves a tool window. I was hoping to style the window identically to match the current theme of Visual Studio. However, I am having a great deal of trouble figuring out how to do it. This post suggests that applying no style at all is all that is required, but that does not match my experience thus far (even creating a default VSIX project in VS2017 and adding a tool window shows a button that I would argue is standard WPF in theme

Open custom user control in tool window using VS Package

耗尽温柔 提交于 2019-12-12 04:00:38
问题 I'm trying to create simple custom command (added in TOOLS menu option) to open the tool bar with custom control in VS 2013 using VS Package project. I'm following https://msdn.microsoft.com/en-us/library/bb165987.aspx this guide but not sure why it's not working. When I click on it, it opens tool window but without content under it. I want to show the MyControl.cs or custom control content under it. I've tried a lot to find it out on Google but no relevent article found for same. I've notice

MEF With Portable Class library using Microsoft Composition MEF2 throws file not found exception

浪子不回头ぞ 提交于 2019-12-12 02:53:16
问题 I am working on Portable Class Library(PCL) and trying to achieve MEF in that. I used System.Composition from Nuget. When i build and package for vsix (Extension for Visual Studio) it doesn't package and place those dll's to extension folder (C:\Users\UserName\AppData\Local\Microsoft\VisualStudio\14.0Exp\Extensions\ExtensionName\AppName\versionofYourApp). When i manually place those library in this folder it works fine. Can some one suggest a good solution to this problem. I am writing it for

How to handle VSTO prerequisites in SideWaffle project template

本小妞迷上赌 提交于 2019-12-11 20:10:33
问题 I'm building a VSTO project template with SideWaffle following the video from: How to create Visual Studio project templates with TemplateBuilder and SideWaffle I added an existing (new) stub VSTO project, set it not to build in both debug and release, but when I hit Ctrl+F5 to launch the Experimental VS instance I get the following three build errors: Could not copy the file "c:\users\john\documents\visual studio 2013\Projects\VisioVstoTemplate\VisioVstoTemplate\.NETFramework,Version=v4.5"

Get Nuget credentials stored somewhere by Visual Studio in a VSIX project

旧街凉风 提交于 2019-12-11 17:45:39
问题 I'm developing a Visual Studio extension (VSIX project) that needs to manage Nuget packages of a given project. I'm already using the IVsPackageInstaller service as documented here but this is limited and I need more features (for example get the latest version number of a given package). I searched but didn't find anything on how to programmatically interact with the Visual Studio Package Manager so I decided to go for the Nuget API directly. I send HTTP requests to the Nuget API using the

Visual Studio Extension: How to disable native command?

眉间皱痕 提交于 2019-12-11 17:18:42
问题 I build an extension that manages correctly Git Modules and, to do so, I have a folder in the solution called SubModules. I managed to add my context menu to the solution file and to the project files, but I would like to disable some native commands when right-clicking on my SubModules folder (i.e. Remove, Add). Is there a way to disable such native command? I tried exploring EnvDTE80.DTE2.Commands, but no luck and searching tells me how to disable my own commands (which I already know how).

How do i get current Branch path from Source control explorer using VS package

僤鯓⒐⒋嵵緔 提交于 2019-12-11 12:02:26
问题 I have created VS extension that creates a menu command on Source control explorer by right click on that it open custom form,Now i want to display current TFS path(from where user right click) in that custom form.Same as TFS "Branching and Merging => Branch" Source Path. Any help Appreciate. 回答1: You can use the VersionControlExplorerExt object with its properties SelectedItems, CurrentFolderItem, etc. From a package it would be something like: private void MenuItemCallback(object sender,