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

Error when running envdte project from console application

I am trying to make work some code I created in an add-in, from console. I am getting errors: Error in solution file: C:\x\x.sln System.Runtime.InteropServices.COMException (0x80010001): Call was rejected by callee. (Exception from HRESULT:…
Thalia
  • 13,637
  • 22
  • 96
  • 190
1
vote
1 answer

Get all projects fron solution throws error

I am in debugging, I got the reference to current solution as DTE2. (as from "adabyron") I often got the following error when I tried foreach loop on vsSolution.Projects: The message filter indicated that the application is busy. (Exception from…
Bin Chen
  • 93
  • 1
  • 8
1
vote
0 answers

Capture VS Static variables while debugging in EnvDTE

The DTE object provides a way to capture all the variables that are in scope: dte.Debugger.CurrentStackFrame.Locals. What method can I use to list all the static variables?
1
vote
0 answers

SolutionContext.ConfigurationName set returns E_FAIL

I have the following code in a custom project based on MPF for Projects - Visual Studio 2010: EnvDTE.Project dteProj = CurrentProject(); dteProj.ConfigurationManager.AddConfigurationRow("MyCustomConfig", "Debug", false); var solution =…
Ciprian
  • 3,533
  • 1
  • 18
  • 22
1
vote
1 answer

Get base constructor parameter from a class

I have a class like this public class cmdGetAllCustomers : CommandBase { public cmdGetAllCustomers(WToken token) : base(token, false, typeof(WCustomer)) { } // ... } I need to get the type of the third base constructor…
Peter Bucher
  • 295
  • 2
  • 13
1
vote
1 answer

DTE.Solution.SolutionBuild.Build no longer working in VS 2010

I have a VS macro that I've been using for years to build my projects automatically. I'm currently trying out VS 2010 to see if I like it (my regular version is 2005), and one segment of the macro is not working in 2010. Well, rather, it will work…
WATYF
  • 409
  • 1
  • 5
  • 16
1
vote
1 answer

Document changes before save

I'm using EnvDTE and with that interface I know is document was saved or not (was there any changes). All I want to know now is there any way to get information like: how many lines was added and how many of them was removed or modified
Marcin Petrów
  • 1,447
  • 5
  • 24
  • 39
1
vote
0 answers

How to get EnvDTE.CodeTypeRef from PropertyInfo.PropertyType (System.CodeDom.CodeTypeReference)

I am trying to get an EnvDTE.CodeTypeRef from a PropertyInfo.PropertyType. I have tried the following (EnvDTE.CodeTypeRef)(new CodeTypeReference(prop.PropertyType,CodeTypeReferenceOptions.GenericTypeParameter)) but get the following error…
1
vote
1 answer

detect Visual Studio 2012 version

How do I detect whether Visual Studio 2012 RTM or Visual Studio 2012 with Update 1 is running using EnvDTE? The DTE.Version contains "11.0" in both cases.
Tomasz Grobelny
  • 2,666
  • 3
  • 33
  • 43
1
vote
1 answer

VIsual Studio Plugin to Run T4 on Build

How can I run T4 files in a project via plugin? Any hint / clue? I'm finding the EnvDte documentation to especially scarce. I got to this solution because I need to run my T4 templates on build events. I don't want to manually run custom tools…
Alwyn
  • 8,079
  • 12
  • 59
  • 107
1
vote
1 answer

DTE - Reading ProjectItem.FileNames in powershell

I am trying to something pretty simple in powershell, I have instance of ProjectItem and I would like read the value of the FileNames property (documented as a string array). However its proving to be quite difficult ForEach ($item in…
Sam
  • 1,725
  • 1
  • 17
  • 28
1
vote
2 answers

Get project dependencies for a project in .net

I want to check if the dependencies of a project (right click on project and click "project dependencies") have been correctly added, programatically. How can I do this? Precisely, Qn- part 1) How can I access the "Dependencies" (not the references)…
aromore
  • 977
  • 2
  • 10
  • 25
1
vote
1 answer

Serialize a domain type of Type

I have some domain classes having a property of type Type (the class). The user can select any class loaded in his project using a custom TypeBrowserEditor. The serialization works fine, I serialize as myType.AssemblyQualifiedName But during the…
0
votes
1 answer

visual studio extensibilty - How can I check if Silverlight debugging is enabled in an ASP.NET Web Site?

How can I programatically check whether a Web Site has Silverlight debugging enabled (ie, whether the "Silverlight" checkbox under "Property Pages->Start Options" is checked)? I know that for a Web Application (WAP), I can check this via EnvDTE ( by…
Omer Raviv
  • 11,409
  • 5
  • 43
  • 82
0
votes
1 answer

Access local variable from visual studio addin

I am trying to write a visual studio addin. The following code is used to display the global variables or class names or function names of a selected text inside visual studio code window. However it do not display the variables defined inside a…
Jehonathan Thomas
  • 2,110
  • 1
  • 28
  • 34