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

Visual Studio EnvDTE.Expression slowing down

I have a Visual Studio addin for Visual Studio 2010 which evaluates a number of expressions (including variables in the current stack frame). It is making repeated calls to: foreach (EnvDTE.Expression expression in…
Bryce Wagner
  • 1,151
  • 7
  • 18
1
vote
1 answer

How to automatically attach process to a specific instance of VS?

I am trying to attach a process to VS by using this code: DTE dte = (DTE)System.Runtime.InteropServices.Marshal.GetActiveObject("VisualStudio.DTE.11.0"); EnvDTE.Processes pro = dte.Debugger.LocalProcesses; foreach (EnvDTE.Process p in pro) { if…
Guid2015
  • 57
  • 11
1
vote
0 answers

How do I keep the UI from updating itself when adding multiple files to a project via a plugin?

I'm trying to create multiple files from inside a VSPackage plugin. When the code runs, each time a new file is created, the environment tries to load it into a default designer. This considerably (and needlessly) slows down the plugin's…
Crono
  • 10,211
  • 6
  • 43
  • 75
1
vote
1 answer

EnvDTE CodeProperty - TypeName of Arrays is ""

I have the following code to iterate through some properties of my class IEnumerable properties = CodeParser.GetEntityProjectItem(this,…
Phill Duffy
  • 2,805
  • 3
  • 33
  • 45
1
vote
2 answers

Cannot resolve symbol 'Dte' with envdte reference

i try to detect debugger and i get error "Cannot resolve symbol 'Dte'" even with envdte reference. Google give me nothing. Thank you. using EnvDTE; namespace test { static class Program { [STAThread] static void Main() …
SLI
  • 713
  • 11
  • 29
1
vote
1 answer

EnvDTE and getting constant value from attribute

I have a class with constant string routes: public class Routes { public const string Route1 = "api/customers"; } And a WebApi controller class with Route attribute: public class CustomerController : ApiController { [Route(Routes.Route1)] …
Aqua
  • 13
  • 2
1
vote
1 answer

How to access a Visual Studio DTE Addin assembly

Here is what I'm trying to do: Create an executable that loads the Visual Studio DTE Access methods of an Addin that is loaded Here is my code, as followed loosely from this blog. [STAThread] static void Main(string[] args) { EnvDTE80.DTE2…
sorrell
  • 1,801
  • 1
  • 16
  • 27
1
vote
1 answer

Visual Studio Automation - Debugger exit event and status code

In a Visual Studio 2013 automation project (ie Visual Studio Package project), how can I have an event handler run when the debugged process exits, and how can I find out what the exit code of the debugged process was? I'm starting the debugger like…
Tom
  • 7,269
  • 1
  • 42
  • 69
1
vote
0 answers

Debugging EnvDTE classes

I'm writing a T4 Template to generate code from various classes in the project. I'd like to get all classes, then process them according to a custom attribute, however I can't get a list of classes, nor can see what I'm getting through the local…
BgrWorker
  • 619
  • 5
  • 20
1
vote
1 answer

Avoiding a full load of solution file via envDTE

Does DTE provide a way to just read a Visual Studio solution file as opposed to calling DTE.Solution.Open(...) which actually loads it? I have some Add-in code that can walk through all the items in a solution file (including containing projects)…
ForeverLearning
  • 6,352
  • 3
  • 27
  • 33
1
vote
0 answers

add an entry to options window in Visual Studio

Is there a way using EnvDTE interface to programmatically add an entry(like Environment) in the options window of Tools menu in Visual Studio using C#? I'm stuck and I don't know how to proceed Many thanks
Ldh
  • 31
  • 1
  • 1
  • 5
1
vote
1 answer

EnvDTE Retrieving the data type from a CodeElement

I am using EnvDTE to generate some code in my latest project. I have a reference to a CodeClass-Object for a given C#-Class but now I wanted to loop through all of its members (in codeClass.Members) and check their types. However I can't manage to…
chrischu
  • 3,047
  • 3
  • 27
  • 44
1
vote
2 answers

How do I provide an implementation of ProjectItem.get_FileNames(i)?

I'm trying to set up a nice REPL for walking csharp code. However I can't seem to code an implementation of EnvDTE.ProjectItem (interface). the definition of the misbehaving property on the interface is in indexer as: string FileNames[short i]…
Maslow
  • 18,464
  • 20
  • 106
  • 193
1
vote
2 answers

How do I get enumerate the PropertyGroup elements in a csproj file from powershell

I'm writing a nuget install script in powershell and I want to access to all the PropertyGroup elements of the project file (*.csproj)? I have access to a variable called $project which represents an object, I believe it to implement the Project…
AwkwardCoder
  • 24,893
  • 27
  • 82
  • 152
1
vote
1 answer

How to tell type of indexing used from debugger

Following shows a C# console application stopped at a breakpoint. The sln variable is of type Solution2. From research, I determined that the Projects item in the solution uses 1-based indexing, so that's how I retrieve the only project in the…
Sabuncu
  • 5,095
  • 5
  • 55
  • 89