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

Package a SharePoint solution from the DTE

Is there a way to package a SharePoint solution in a .wsp file from the Visual Studio dte? I can build the solution with the following command: $dte.ExecuteCommand("Build.RebuildSolution") But that doesn't package the project. Note: I was trying to…
epotter
  • 7,631
  • 7
  • 63
  • 88
0
votes
1 answer

VS Extension VSIX Save all unsaved documents

Is there a way to save all unsaved documents (files with the '*' in the VS editor tab) using DTE or something else in a VSIX command? I'm creating a command that reads the current document's syntax tree, but I cannot access unsaved changes made to…
0
votes
1 answer

How to get notified when a Visual Studio project is renamed (VSIX)?

I'm building a Visual Studio extension and I need to get notification when a project is renamed. Tried using DTE2.Events2.SolutionEvents and also tried IVsSolutionEvents. Both of them work fine for C#, VB.NET, and F# projects, but not for C++…
omsharp
  • 300
  • 1
  • 13
0
votes
1 answer

How can I programmatically examine the stack in my Visual Studio extension?

In a VS extension, assume that the code has just hit a breakpoint, and is in break mode. How can I programmatically examine the stack? Also, is there a way to figure out what the last executed statement was? I haven't been able to find an advanced…
Sabuncu
  • 5,095
  • 5
  • 55
  • 89
0
votes
1 answer

EnvDTE - add file to project silently

I am using EnvDTE to add projects and files to existing solution. I do it like that: SolutionFolder folder = GetExistingSolutionFolder(folderTree); if(folder != null) folder.Parent.ProjectItems.AddFromFile(filePath); Nevermind the…
Adam Jachocki
  • 1,897
  • 1
  • 12
  • 28
0
votes
0 answers

Can we invoke Visual studio's "Find All References" in C# code? How?

I am trying to invoke visual studio's Find All References in a visual studio add-in project(vsix). EnvDTE and EnvDTE80 assemblies have been used for build features or add files to project features. Wandering, if there is any api to invoke Find All…
chaitali
  • 63
  • 5
0
votes
0 answers

Trying to add folder through Env DTE ProjectItem.AddFolder but getting folder already exists

I'm generating some code using T4 templates and adding them to a project using EnvDTE In order to add a file into the correct folder of the project, I'm "recursively" searching the project items for the folder I want to add the new item to. If it…
Joshua Dunn
  • 71
  • 1
  • 6
0
votes
1 answer

Is it possible that filter IIS worker processes with more criteria?

I have a small block of code like below for listing all IIS worker process. (w3wp.exe) But I need more filtering criteria when multiple w3wp.exe processes exist. Is there any option for filter with Application Pool Name or Site Name? var processes =…
anilcemsimsek
  • 803
  • 10
  • 21
0
votes
0 answers

DTE selectedItems Project field in null when

I'm using dte in order to get the path to a file I right-clicked on in VS extension. I used SelectedItems like in here: SelectedItem.DTE Property However, the Project field is always null when testing. I'm testing on another solution in which I…
0
votes
1 answer

Visual Studio Extension: All items are loaded

I am writing a visual studio extension. Just wondering, is there any listener event that can return true when the IDE (visual studio) is not busy, all items are loaded, or the status bar text = "Ready"? I tried to open a file after the solution is…
Vion
  • 11
  • 4
0
votes
1 answer

EnvDTE - How to get the text from a file in a project

I will ask you to please explain your answer, as I'm not acquainted with this Library So what I'm trying is to is get the text of all project items and count all lines. What is the best way is approaching this problem ?
AndrewToasterr
  • 459
  • 1
  • 5
  • 16
0
votes
1 answer

Updating form designer after adding controls through an Add-In

I am exploring the EnvDTE library, and building a form generator. I have successfully added controls to a form, however, the controls' codes are not added to the form designer (formname.Designer.cs), and that is a problem if I want to add event…
Marcelo
  • 3,371
  • 10
  • 45
  • 76
0
votes
2 answers

C# Add-in: How do you access runtime instances of objects while debugging?

I am developing an add in for C# that would only be used during debugging. Once instantiated, my add in needs to find all instances of a specific class or interface to display a graph about the data found. How exactly can I find or access these…
Dylan Meador
  • 2,381
  • 1
  • 19
  • 32
0
votes
1 answer

How to programatically add an existing project to a solution folder in Visual Studio

I have a solution that I want to programatically add an existing project to. Opening the solution using envdte automation is relatively easy var envDteType = Type.GetTypeFromProgID("VisualStudio.DTE.15.0"); var envDte =…
fiat
  • 15,501
  • 9
  • 81
  • 103
0
votes
1 answer

Visual Studio DTE - how to programmatically select multiple projects

I'm trying to create a little Visual Studio Extension, to do some batch project load and unloading. To do this, I have to select multiple projects at once and then call the Project.ReloadProject or Project.UnloadProject command. If I load or unload…
roli09
  • 817
  • 1
  • 8
  • 20