Questions tagged [vspackage]

VSPackages are software modules that extend the Visual Studio IDE by providing UI elements, services, projects, editors, and designers.

VSPackages 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 VSPackages include tool windows and editors to provide additional UI functionality and menus to provide access to additional services and functions.

363 questions
44
votes
4 answers

Visual Studio 2012 error: Package 'Visual C++ package' failed to load

When I'm trying to open any solutions that worked fine before in Visual Studio 2012, the error "Package 'Visual C++ package' failed to load" keeps showing up. And the solution can't be opened. I'm not sure what's wrong with my Visual Studio 2012…
user1964417
  • 1,675
  • 4
  • 17
  • 26
32
votes
3 answers

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

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?
Nathan Voxland
  • 15,453
  • 2
  • 48
  • 64
30
votes
3 answers

How do you get the current solution directory from a VSPackage?

Following is how you would get the current solution directory from an add-in: _applicationObject = (DTE2)application; // retrieved from OnConnection method string solutionDir =…
Dave Clemmer
  • 3,741
  • 12
  • 49
  • 72
22
votes
5 answers

My vs package did not load correctly

I've got an addin that I developed and used with earlier versions of Visual Studio, and I've managed to develop an interface between it and a VS Package for VS 2015. From my "Command" class, I have a callback function that wraps a call to…
Wally Walrus
  • 253
  • 1
  • 2
  • 7
18
votes
3 answers

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

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…
Anthony Brien
  • 6,106
  • 7
  • 43
  • 56
18
votes
1 answer

Cannot run VSPackage when developing on multiple machines

We are working on a VSPackage in a team, using Visual Studio 2012 and TFS. The extension works fine on the computer used to create it (through a wizard). On another computer, Visual Studio says that "a project with output type of class library…
18
votes
1 answer

VSIX - Cannot load file or assembly of a referenced dll

My question is very similar to this one, only that the answer and work-around are not working for me. Also I am in Visual Studio 2012. I have a VSPackage which is referencing another project, which is dependent on other dlls. Everytime time I run…
Adam
  • 3,014
  • 5
  • 33
  • 59
16
votes
6 answers

Detect the Visual Studio version inside a VSPackage

How can I check/detect which Visual Studio version is running under my VSPackage? I cannot get from the registry because the computer could have several versions installed, so I guess there is an API that is able to get it. Anybody knows how to get…
Daniel Peñalba
  • 30,507
  • 32
  • 137
  • 219
15
votes
2 answers

Extending the Visual Studio 2010 editor by adding a context menu item to manipulate selected text

I'd like to create an extension to Visual Studio that will allow someone to select any text in an editor, right-click to get a context menu, and then perform some action on the text by clicking on my custom menu item. Let's say for example that my…
Andy West
  • 12,302
  • 4
  • 34
  • 52
14
votes
1 answer

Access current code pane in Visual Studio Extension

Im writing a visual studio (2010) extension with a right click menu whilst in a code view. I want to be able to examine the current code from my menu item event handler but havent been able to find somewhere in the object model to do this. How do i…
undefined
  • 33,537
  • 22
  • 129
  • 198
14
votes
1 answer

Making a global exception handler for Visual Studio 2010 VsPackage

In previous versions of Visual Studio, there was a single entry point to an extension (more specifically, an addin), the OnConnect method. From there it was possible to perform all the Visual Studio operations, such as adding menu items, and setting…
Igal Tabachnik
  • 31,174
  • 15
  • 92
  • 157
14
votes
1 answer

How do I detect a breakpoint being deleted in Visual Studio?

There doesn't seem to be any event in EnvDTE's DebuggerEvents that notifies the consumer when a breakpoint is deleted. I've also looked at Visual Studio SDK and registered an IDebugEventCallback2, but no callback seems to be triggered when I deleted…
Omer Raviv
  • 11,409
  • 5
  • 43
  • 82
13
votes
4 answers

Why isn't my vspackage's context menu showing

I already have a package that I created, and I'd like to add a menu to the Code Window context menu. After a little search I found several articles explaining how to do it. The problem is, I can't get it work.... Here are my declarations in the vsct…
ppetrov
  • 3,077
  • 2
  • 15
  • 27
11
votes
1 answer

Finding a ProjectItem by type name via DTE

Given a type name, is it possible to use DTE to find the ProjectItem that the type is located in? Something similar to how the Navigate To... dialog works in Visual Studio 2010. The closest I could find is Solution.FindProjectItem, but that takes in…
Igal Tabachnik
  • 31,174
  • 15
  • 92
  • 157
11
votes
5 answers

Create Visual Studio Theme Specific Syntax Highlighting

I would like to create a Syntax Highlighter in Visual Studio 2012 (and above) that supports different themes (Dark, Light, Blue). Visual Studio's Editor Classifier project template explains how to create your own colors in the environment using…
1
2 3
24 25