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
4
votes
1 answer

How to Detect if Visual Studio IDE is closing using VSPackage?

I'm writing a VS Package where I need to store the time when the user start my package, and when the user close the Visual Studio. The problem is, I don't know how to get the closing event for the Visual Studio. Can anyone give me any information…
Budi Hartanto
  • 337
  • 3
  • 14
4
votes
1 answer

How to refresh Visual Studio settings after setting a value in a VSPackage

In a Visual Studio extension I have defined a VSPackage with a number of commands in it. In the handler for one of the commands, I set a user setting using the following code: SettingsManager settingsManager = new…
dcstraw
  • 3,243
  • 3
  • 29
  • 38
4
votes
0 answers

How to get call relations of an open solution by using a plugin

I try to develop a VSPackage for VS 2010 that investigates all the available methods in the current solution and to reconstruct the call relations of each single method just like the built in Call Hierarchy feature of VS does. I managed to get all…
4
votes
1 answer

OnEnterRunMode in VSPackage not work

I am developing an Extension (VSPackage), I am subscribing to 2 of the Debugger events in the constructor of VSPackage.cs public sealed class ComboBoxPackage : Package { .... public ComboBoxPackage() { …
Ruthg
  • 241
  • 2
  • 4
  • 11
4
votes
1 answer

How to Get Project Type Guid of selected project in the Solution Explorer by using VS Package

I've created the simple VS Package for adding new item in the context menu of solution explorer. In that I need to check Selected Project's Project Type GUID. How can i get this. For example, One Solution contains the three different type of…
3
votes
2 answers

VSIX cannot find referenced assembly from included package, VS 2017

I have written a VSIX that fails in VS 2017 System.IO.FileNotFoundException: Could not load file or assembly 'System.Numerics.Vectors, Version=4.1.4.0 Yet the csproj includes the package for that assembly
Jim W
  • 4,866
  • 1
  • 27
  • 43
3
votes
1 answer

How to know if a Visual Studio project item is a WebReference?

I'm developing a Visual Studio extensibility package. I need to get the files under a project hierarchy using IVsSccProject2.GetSccFiles. Visual Studio behaves different for an standard folders and for WebReferences: An standard folder returns no…
Daniel Peñalba
  • 30,507
  • 32
  • 137
  • 219
3
votes
1 answer

How do you prevent the VS Shell from getting priority on key/command bindings in a VSPackage ToolWindow?

I have wpf a user control that accepts input gestures to perform various commands. In the example image below, the user can press Ctrl+N to execute the New command to create a new item in the TreeView. When this user control is hosted within a WPF…
Dave Clemmer
  • 3,741
  • 12
  • 49
  • 72
3
votes
1 answer

Modifying app.config file with Visual Studio Extension

I am trying to create a Visual Studio Extension (either Add-In or VSPackage) that will do the following: 1) Find all selected projects in the current solution. 2) Obtain access to each project's app.config or web.config file and modify it. I have…
armahg
  • 739
  • 2
  • 10
  • 11
3
votes
1 answer

Getting the dte2 or TeamFoundationServerExt object in a VS Package project?

I am working on a Visual Studio Package project. This project needs a connection to our TFS. To read the current connection, I would need the TeamFoundationServerExt object, which I should be able to get from the dte2 object. Now I found hundreds of…
Core_F
  • 3,372
  • 3
  • 30
  • 53
3
votes
2 answers

How to be notified when a solution has been loaded for a VSPackage?

I would like to be notified when a solution has been completely loaded. Inspired by this answer I tried implementing IVsSolutionEvents. When I load a solution with two C# projects, wait until loading has finished and finally close Visual Studio…
CodeFox
  • 3,321
  • 1
  • 29
  • 41
3
votes
1 answer

Importing MEF Components from VSPackage Class

I need to be able to communicate with my MEF component from my package class. I tried several different approaches: used [import] attributes from the package class. However the properties are always null. As I found out this is due to the fact…
ShameWare
  • 193
  • 7
3
votes
4 answers

Visual Studio Extension: Access VS Options from arbitrary DLL

I'm currently developing my first VS extension, which needs to provide some options to the user. Following https://msdn.microsoft.com/en-us/library/bb166195.aspx, it was rather easy to come up with my own options page. However, I have not yet found…
csoltenborn
  • 1,127
  • 1
  • 12
  • 22
3
votes
1 answer

The new project type and template does not show up after installing VSIX package

I have developed a VSPackage for Visual Studio. I followed all the instructions in these walkthroughs: Part 1 - Creating a Basic Project System Part 2 - Creating a Basic Project System Everything works fine when I debug the project: I see a new…
A-Sharabiani
  • 17,750
  • 17
  • 113
  • 128
3
votes
1 answer

How to execute custom code on VSIX package uninstallation?

Is there any way to clean registry entries or invoke any custom logic when VSIX package (your package you've coded, not just an arbitrary one) is being removed from Visual Studio?
jwaliszko
  • 16,942
  • 22
  • 92
  • 158