Questions tagged [envdte]

EnvDTE is an assembly-wrapped COM library containing the objects and members for Visual Studio core automation.

The MSDN Documentation for EnvDTE says

EnvDTE is an assembly-wrapped COM library containing the objects and members for Visual Studio core automation.

572 questions
32
votes
1 answer

Adding solution-level items in a NuGet package

I want to add solution folders and solution items (not projects) to a solution file via a NuGet package. I imagine this would be accomplished through Powershell. I've looked through the documentation for NuGet, Powershell, and EnvDTE and can't…
brainiac10
  • 1,733
  • 1
  • 12
  • 8
29
votes
2 answers

Accessing attribute info from DTE

I have coded something like the following: [Attrib(typeof(MyCustomType))] public class TargetType { // ..... } I want to use EnvDTE to get a reference to the CodeElement referenced by the typeof. I know how to get a reference to the attribute…
Levi Drain
  • 445
  • 3
  • 10
23
votes
3 answers

How to get list of projects in current Visual studio solution?

When we open Package Manager Console in any open solution, it shows all the projects of that solution. How it is loading all the projects of the same solution. When I tried with below shown code it is fetching me projects of the first solution…
Palak.Maheria
  • 1,497
  • 2
  • 15
  • 32
21
votes
2 answers

Programmatically getting the current Visual Studio IDE solution directory from addins

I have some tools that perform updates on .NET solutions, but they need to know the directory where the solution is located. I added these tools as External Tools, where they appear in the IDE Tools menu, and supplying $(SolutionDir) as an argument.…
Dave Clemmer
  • 3,741
  • 12
  • 49
  • 72
18
votes
7 answers

Get types used inside a C# method body

Is there a way to get all types used inside C# method? For example, public int foo(string str) { Bar bar = new Bar(); string x = "test"; TEST t = bar.GetTEST(); } would return: Bar, string and TEST. All I can get now is the method body…
Silx
  • 2,663
  • 20
  • 21
17
votes
5 answers

devenv process keeps running in background after I close Visual Studio 2015

Problem When I close Visual Studio 2015 by pressing the close button on the IDE, the devenv.exe process keeps running in background between 3-5 minutes, after that time, it closes automatically, really strange. I discovered this issue because I…
ElektroStudios
  • 19,105
  • 33
  • 200
  • 417
17
votes
1 answer

Add an Item to the visual studio folder right-click menu within AddIn

I want to add a menuitem to the right-click=>Add menu in visual studio 2012 solution explorer. When click the custom item I can add a project with my template. I developed a Visual Studio Add-In to do it but I get into some trouble. I am able to add…
ZhiGuang
  • 179
  • 1
  • 1
  • 4
16
votes
2 answers

Can't execute statement with VS Debugger Interop

I'm writing a debugger extension VSPackage in which I want to execute a statement in the debugged process when a breakpoint is hit. In my extension code I have this: void Initialize() { // ...standard vspackage init code omitted... …
16
votes
3 answers

EnvDTE not found in VS2012 works in VS2010

I'm using EnvDTE to do some code generation within my T4 Templates. I have the code working correctly in Visual Studio 2010, however I've just started using Visual Studio 2012 and now when I try to run my templates I get the following…
Midimatt
  • 1,114
  • 2
  • 17
  • 35
14
votes
2 answers

Programmatically reset VisualStudio shortcuts

There are two related questions about resetting VisualStudio keyboard scheme and importing VisualStudio settings. However, this doesn't seem to play nice all together. I have two settings files containing shortcuts:
Matthias
  • 15,919
  • 5
  • 39
  • 84
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
14
votes
8 answers

How to put breakpoint in every function of .cpp file?

Is there a macro that does it? Which DTE objects to use?
Constantin
  • 27,478
  • 10
  • 60
  • 79
14
votes
3 answers

How to use DTE in PowerShell?

I am trying to use PowerShell to automate the process of creating an n-tier solution based on a seed (think EDMX file or DbContext) configuration. I want to be able to open a skeleton solution, get the active instance, and populate project files…
a_arias
  • 3,036
  • 2
  • 21
  • 20
13
votes
2 answers

Setting the OutputPath property of a project via Visual Studio Automation

I'm writing a VSIX package to allow the user to bulk-edit the OutputPath property of all the active configurations of projects in the currently loaded solution (see the incredibly annoying step #4 here). I ran into a very specific problem: when…
DoomMuffins
  • 1,174
  • 1
  • 9
  • 19
13
votes
3 answers

Capture window close event

I want to capture events that close editor window (tab) in Visual Studio 2008 IDE. When I use dte2.Application.Events.get_CommandEvents(null, 0).BeforeExecute I successfully captured such…
user167876
  • 131
  • 1
  • 4
1
2 3
38 39