Questions tagged [visual-studio-package]

Visual Studio Packages are part of the Visual Studio eXtensibility (VSX) framework that allow developers to develop software modules to extend the Visual Studio IDE. Typical elements that are developed in VS Packages include tool windows and editors to provide additional UI functionality and menus to provide access to additional services and functions.

39 questions
15
votes
2 answers

Visual Studio Package: Settings the visibility of a custom Solution Explorer context menu item

I am creating a Visual Studio Package (this is my first time) and my end goal is to create a context-menu item for the solution explorer that only works on certain file types. (I thought this would be a common thing, but didn't find any decent…
musefan
  • 47,875
  • 21
  • 135
  • 185
10
votes
3 answers

calling Roslyn from VSIX command

What is best way to obtain Roslyn's SyntaxTree from EnvDTE.ProjectItem? I found some method for the other way (Roslyn's Document into ProjectItem). I got VSIX command called from opened document and I'd like to experiment with Roslyn's syntax tree…
maliger
  • 761
  • 5
  • 9
6
votes
2 answers

How to determine whether or not EnvDTE.Project object represents a C/C++ project?

I have a Project instance, and I don't understand how to find out the project type/language. Specifically, I need to check for a C/C++ project. The docs seem lacking. Previously, another person added the following bit of magic to my open-source VS…
5
votes
1 answer

Export custom EditorFormatDefinition at runtime

In a Visual Studio extension I've built I need to highlight method invocations within the Visual Studio editor. For example: I would like to use HSV colors to divide up the color spectrum according to to the number of unique invocations. I can…
4
votes
1 answer

Visual Studio Custom Editor for Specific File

Context: I'm creating custom project template for visual studio 2017 which works well. Inside this project template, I emit a file named "manifest.json". I need to create custom editor\designer for the "manifest.json" file that's when the user…
4
votes
1 answer

Adding a using directive to a class programmatically

I am studying Visual Studio Extensibility. This code from MSDN creates a new C# solution containing a project with a class: EnvDTE.DTE dte = this.GetService(typeof(Microsoft.VisualStudio.Shell.Interop.SDTE)) as EnvDTE.DTE; EnvDTE80.Solution2…
Jack Griffin
  • 1,228
  • 10
  • 17
4
votes
0 answers

Visual Studio Extension for Custom Memory Window

My custom tool window in a Visual Studio Extension package is supposed to evaluate custom expressions during debug sessions for VS2012 and VS2013. The final goal is to build a graphical watch window. Therefore, I must fetch the value of the…
4
votes
2 answers

How to permanently remove extension from Visual Studio 2012?

I have noticed the following behavior of Visual Studio 2012: I create VS2012 Package Project (from SDK). When I compile and run it, an experimental VS instance is launched, so I can test implemented package. But If I uninstall package from…
4
votes
2 answers

Visual Studio VSPackage / Single File Generator - Log Message to Error List

I'm working on creating a Visual Studio VSPackage containing a Single File Generator (IVsSingleFileGenerator) and I want to be able to log events to the Visual Studio Error List (http://msdn.microsoft.com/en-us/library/33df3b7a(v=vs.110).aspx) I am…
Philip Pittle
  • 11,821
  • 8
  • 59
  • 123
3
votes
2 answers

Automatically update Visual Studio Extension

I'm trying to make my extension automatically update itself when new versions are pushed to the Visual Studio Gallery. There are a few guides on how one may achieve this, but they are a couple years old and may not apply. For starters, I'm trying to…
3
votes
2 answers

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

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.
3
votes
2 answers

Visual Studio Package: Is it possible to show tooltips on text line markers?

Implementing "squiggle" text line markers in JSLint.NET was quite straight forward as can be seen here: However, despite implementing IVsTextMarkerClient with the GetTipText method, tooltips are never shown. The GetTipText method is never even…
3
votes
1 answer

IClassifierProvider is not getting initiated

I am trying to add color to the visual studio build output. So I am trying to get classifier of IClassifierProvider. But GetClassifier() is not getting called. What could be the problem? Source code sample is given below. When I am trying with…
2
votes
4 answers

How to call ToolWindowPane constructor with parameters from Package object?

I am creating a Visual Studio Package extension with a tool window that needs to be shown. I have a class representing my tool window that extends ToolWindowPane: [Guid(GuidList.guidToolWindowPersistanceString)] public class MyToolWindow :…
2
votes
1 answer

Open a Custom Tool Window on Visual Studio without calling it from the View menu

I've seen that through the Visual Studio Extensibility tools, you can add custom commands such as Light Bulbs, Tool Windows (like the Properties panel) and so on... Basically I am trying to create a Custom Tool Window that gets opened not from the…
1
2 3