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

Get all classes in project in Visual Studio Scaffolder

I am building a scaffolding tool for visual studio, and need to present a list of classes that derive from a certain abstract class, but only classes in the active project. I have it working, but it takes visual studio a little while to run the…
Hazza
  • 6,441
  • 3
  • 24
  • 37
4
votes
1 answer

'Must specify an object' on piping variable to Get-Member

How come I can successfully pipe result of a cmdlet to Get-Member, but not through a variable? PM> Get-ProjectFolder "Services" -Project "Foobar" | Get-Member TypeName: System.__ComObject#{8e2f1269-185e-43c7-8899-950ad2769ccf} Name …
Ilya Kozhevnikov
  • 10,242
  • 4
  • 40
  • 70
4
votes
3 answers

Remove a keyboard shortcut binding in Visual Studio using Macros

I have a lot of custom keyboard shortcuts set up. To avoid having to set them up every time I install a new visual studio (happens quite a lot currectly, with VS2010 being in beta/RC) I have created a macro, that sets up all my custom commands, like…
Pete
  • 12,206
  • 8
  • 54
  • 70
4
votes
1 answer

ENVDTE - Add new project to existing solution and locate it in a specific folder

I wrote a Visual Studio Wizard Template using c# on visual studio 2012. I followed the MSDN steps: I created a VS template, then I created a Class Library project with a class which implements the IWizard interface, I configured the .vstemplate file…
user1835297
  • 1,059
  • 2
  • 12
  • 24
4
votes
0 answers

How to bind solution with visual studio package

I am trying to create a visual studio package. I have tried to bind solution to package but it selects the first solution open. How can I bind solution to my package.
niks
  • 101
  • 8
4
votes
1 answer

Skip private properties when iterating class members using EnvDte

I have written this helper method to get the properties from a class, but it also gets the private properties. How can I get public properties only? public IEnumerable GetProperties(CodeClass @class) { return…
Anders
  • 17,306
  • 10
  • 76
  • 144
4
votes
1 answer

How can I run custom tool or save a file programmatically using EnvDTE?

I want to save/run custom tools on a handful of .tt files from my extension. I don't want to loop over all the files in the solution/project, rather I want to be able to use a relative (or full) path of the file to execute a save/run custom tool. Is…
Omar
  • 39,496
  • 45
  • 145
  • 213
4
votes
2 answers

VB.NET EnvDTE Up-To-Date check before building project

how do I check if a project is up-to-date? I'm basically trying to programmatically build each project in a list but only if they have changed. So does anyone know of a way (using EnvDTE maybe) to check if a project changed and therefore needs to…
Kingamoon
  • 1,467
  • 1
  • 18
  • 32
4
votes
1 answer

How to determine if a type implements an interface in Powershell

I have a Member class in a project. I find this class by using powershell on package manager console in Visual Studio. public class Member : ICacheable { public string FirstName; public string LastName; ... } It prints something like…
Barış Velioğlu
  • 5,709
  • 15
  • 59
  • 105
4
votes
3 answers

Given Project GUID, how can I find the name/path of the project?

I have a list of Project GUIDs from a sln file. I need to find the project corresponding to each GUID programatically. How can I do this?
aromore
  • 977
  • 2
  • 10
  • 25
4
votes
0 answers

How to get the syntax hightlighting information for a selected keyword from DTE object (VS 2010)?

Is it possible to get the information which syntax color scheme was used to highlight a selected symbol/keyword in the code editor? I want to get the informations that is shown under Tools->Options->Environment->Font and Colors for the selected…
Yots
  • 1,655
  • 6
  • 17
  • 25
4
votes
1 answer

Test Explorer List in Visual Studio 2012 Extension VSIX

I would like to retrieve the list of tests from the test explorer in a visual studio 2012 extension. Is this possible using the Package.GetGlobalService or via DTE? [Edit] Since this is getting no response I'll provide some more info. Currently IDE…
Scott Mackay
  • 1,194
  • 10
  • 34
3
votes
0 answers

EnvDTE Refresh Document

I have an open document in Visual Studio. While my T4 template is running, it writes to the source file of the open document. When the T4 template finishes doing this, I want it to make Visual Studio reload the document in question from its source.…
Jeff
  • 35,755
  • 15
  • 108
  • 220
3
votes
0 answers

How can I create an instance of IVsSolution4?

I am updating a Visual Studio extension to work in Visual Studio 2022. The extension was last updated for Visual Studio 2017. In the extension is a helper method, ReloadProject, used to reload a project and optionally apply an action while the…
3
votes
3 answers

Programmatically publish web application

I'm trying to write a visual studio extension that allows me to publish multiple web applications in a solution, similar to using the one-click publish feature on all the projects. DTE2 service = (DTE2)this.GetService(typeof(DTE)); Projects projects…
nivlam
  • 3,223
  • 4
  • 30
  • 39