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

Visual Studio serialization error when T4 uses DTE to open generated file

We have a C# T4 file named GenerateProxies.tt which calls several command-line codegen utilities. Using the System.Diagnostics Process class, we redirect the standard output to the T4 output text file (GenerateProxies.txt) so that we can review the…
McGuireV10
  • 9,572
  • 5
  • 48
  • 64
10
votes
1 answer

T4 Scaffolding not working with visual studio 2015

I have created a library of T4 scaffolding templates that i've used successfully in previous versions of visual studio, but now having upgraded my projects to VS 2015 I get the following error when opening the "Package Manager…
Nick Ready
  • 143
  • 2
  • 9
10
votes
3 answers

Add code analysis ruleset through nuget package

I'm trying to build a NuGet package that adds our company's code analysis dictionary automatically and updatable. The rule set is added in the content folder and now I want to use the install.ps1 script to add the rule set in the project file. I…
Boris Callens
  • 90,659
  • 85
  • 207
  • 305
10
votes
2 answers

Collect a list of user classes in a project using EnvDTE

I am having a problem creating a way to list all the classes in my project using EnvDTE for templating interfaces using T4 (based on naming conventions), and none of the documentation out there seems to describe how to do it. I started out…
Jeremy Holovacs
  • 22,480
  • 33
  • 117
  • 254
9
votes
2 answers

Can you do a RunCustomTool with EnvDTE as a pre-build event?

I am using T4MVC, and I can't use a pre-build event to run TextTransform.exe as it relies on EnvDTE, and must be run with Visual Studio as host. If I have run custom tool once, it works nicely because it marks itself dirty when its executed…
Luhmann
  • 3,860
  • 26
  • 33
9
votes
0 answers

Programmatically list variables in watch window

Is there a way to find out what variables are present in the watch window of visual studio? DTE dte; var watchWindow = dte.Windows.Item(EnvDTE.Constants.vsWindowKindWatch); We can get the watch window as above, but haven't found a way to get list…
dushyantp
  • 4,398
  • 7
  • 37
  • 59
9
votes
1 answer

Information about debugging engines used by the debugger

In Visual Studio, if you want to attach debugger to any processes, you have the possibility to select some specific engine (code type) or set of engines you would like to use: Next (after you selected any engines and processes), if you click Attach…
jwaliszko
  • 16,942
  • 22
  • 92
  • 158
9
votes
2 answers

Accessing Projects via DTE in C# T4 Template

I'm currently trying to iterate over all of my projects (sharepoint) to get all feature guids into an file. there i want to prefix them with the projects name. My problem is DTE.Solution.Item and DTE.Solution.Projects.Item (or the enumerators for…
TGlatzer
  • 5,815
  • 2
  • 25
  • 46
9
votes
1 answer

How to get the generic type parameters for a ENVDTE CodeInterface?

I'm writing a T4 template in Visual Studio 2010 and am generating code based on existing classes in a project. The code I need to generate depends on the generic type arguments of the interface that the classes implement, but I don't see a way to…
Steven
  • 166,672
  • 24
  • 332
  • 435
9
votes
2 answers

Add an existing project to solution folder using PowerShell

I'm working on a PowerShell script to dynamically create and add a Visual Studio project with its folders and assets to a solution. I'm using Visual Studio DTE. My directory structure on the file system is the…
9
votes
1 answer

Setting cursor position with Visual Studio Extension

I'm writing my own Visual Studio 2010 Extension that should help me navigating a rather large solution. I already have a dialog based VS Extension that shows me a class name and a function name depending on some search criteria. I now can click this…
9
votes
2 answers

DTE.ExecuteCommand and wait

I would like use macros for publishing my webapplication project. The little problem is, DTE.ExecuteCommand run asynchronously, and I need to wait until the command is done. Example: …
TcKs
  • 25,849
  • 11
  • 66
  • 104
8
votes
1 answer

How do I programmatically find out the Action of each StartUp Project in a solution?

Under Solution->Properties, I can set multiple start-up projects: I know that I can get the list of projects marked with "Start" (by using EnvDTE: solution.SolutionBuild.StartupProjects), but how do I get the list of projects whose action is "Start…
Omer Raviv
  • 11,409
  • 5
  • 43
  • 82
8
votes
5 answers

Visual Studio 2010 DTE: How to make added DLL reference absolute and not copied

Summary: We need to duplicate the behaviour of the Add Reference dialog, using DTE, when you add a specific DLL (it adds a Hint path entry to the reference in the CSProj file). **Note: There is another related, but not duplicated, post from me here:…
iCollect.it Ltd
  • 92,391
  • 25
  • 181
  • 202
8
votes
2 answers

How do I get the output directories from the last build?

Let's say I've got a solution with one or more projects, and I've just kicked off a build using the following method: _dte.Solution.SolutionBuild.Build(true); // EnvDTE.DTE How can I get the output paths for each project that just built? For…
user1228
1 2
3
38 39