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
1
vote
2 answers

Instantiating VisualStudio 2008

I'm trying to get a list of all projects within a specified VS2008 solution. (this is a stand-alone console app, it is not a Visual Studio add-in) My code works with VS2005 solutions, but I get all sorts of ugly COM errors trying to use the VS2008…
SWeko
  • 30,434
  • 10
  • 71
  • 106
1
vote
1 answer

Remove projects from a solution programmatically

I need to exclude some bugged projects from a very big solution to do an automated build with this script. I tried to edit the build configuration to exclude those project, and i tried also to unload them from the solution, but i found out that the…
Doc
  • 5,078
  • 6
  • 52
  • 88
1
vote
1 answer

How to get a function Return Type as a CodeClass2 from a method CodeElement2

Using EnvDTE in a T4 template I can get all methods from a class easily. Taking it a step further and looping those methods to get the return type as a CodeClass2 (or simply CodeElement2) I get…
Ryan Anderson
  • 937
  • 10
  • 23
1
vote
1 answer

Getting is document pinned or not on Visual Studio 2012 tab bar in extension

I'm wondering is it possible to get is document pinned or not on VS tab bar, since this functionality was added only in 2012 VS it's hard to find any examples of people trying to do something with it. MSDN manual isn't helping on that matter either,…
Predelnik
  • 5,066
  • 2
  • 24
  • 36
1
vote
2 answers

EnvDTE partial class keyword

I'm introspecting on the code in a project using EnvDTE, and I want to be able to determine if they're a partial class, but it doesn't seem to exist in the namespace. Does anyone know how to do this?
Paul
  • 35,689
  • 11
  • 93
  • 122
1
vote
0 answers

AddFromTemplate() throw exception in VS 2012

I create Visual Studio C++ project programmatically. I build it by Solution2.SolAddFromTemplate() method: //Create VS IDE Type visualStudioType=Type.GetTypeFromProgID("VisualStudio.DTE.10.0"); DTE dte =…
1
vote
2 answers

Check if the current document in Visual Studio 2012 is a Code Window

I am looking for a way to have my extension check if the currently opened window in visual studio 2012 is one, where the user can write code (or any kind of text, really). To check if the currently opened window has changed, I use…
1
vote
1 answer

C# generator needs to format file programmatically

I have a C# Visual Studio 2010 console application that reads lines from an Excel spreadsheet and then generates C# classes accordingly using a StreamWriter. The generated lines of code in the classes are unformatted - as in they are not indented. I…
Stu Harper
  • 721
  • 2
  • 9
  • 22
1
vote
1 answer

selecting a specific project using $dte in Visual Studio 2012

I am trying to unload a project using $dte powershell command. I am running this command from Package Manager Console in Visual Studio. I know I can unload the project using $dte.ExecuteCommand("Project.UnloadProject") But before this, I would…
Ram V
  • 724
  • 1
  • 8
  • 18
1
vote
0 answers

How can I programmatically access Visual Studio 2013's Return Values that appear in the Autos Window?

Visual Studio 2013 has the capability of showing the return values of every method in the statement that's been stepped over. They appear in the autos window. My question is, how can I programmatically obtain them, using VS-SDK (as…
Omer Raviv
  • 11,409
  • 5
  • 43
  • 82
1
vote
1 answer

Attach help to error in error list

I am developing Visual studio plugin. In plug in , I am adding error in error list of visual studio plug in. I know how to add error. Now I want to give help for each error. I am using below code to add error to error list : public static…
ChandniShah
  • 249
  • 1
  • 3
  • 12
1
vote
1 answer

In a Visual Studio Add-In, how to disable menu items during a build?

When you write a VS addin that proffers menu items to VS, it calls your QueryStatus implementation to check whether your menu items should be visible, enabled, etc. My menu items are not appropriate to run during certain situations, e.g. when a…
Jay Bazuzi
  • 45,157
  • 15
  • 111
  • 168
1
vote
1 answer

Access Visual Studio 'Open With' Command via EnvDTE

In Visual Studio 2012, when right clicking a file in the solution explorer and clicking 'Open with...' the dialog pictured in the image below is shown: https://i.stack.imgur.com/gL2Wr.jpg Is there a way to use this exact dialog window via the EnvDTE…
1
vote
1 answer

Reusing Visual Studio Debugging Visualizers

I am developing a Visual Studio Add-in where one of the controls is a settings editor similar to the locals or watch window. Because strings are one of the data types being displayed/supported in this control, I would like to add a text visualizer…
1
vote
1 answer

Get the nested type of a generic CodeProperty using EnvDTE

I have a CodeProperty object in my T4 template of a generic property (ICollection). How can I get the CodeElement object of MyNameSpace.MyType so I can inspect and do other things with it?
Omar
  • 39,496
  • 45
  • 145
  • 213