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

Performance of changing Visual Studio colors with custom add-in

I'm creating an add-in for Visual Studio 2008 that will allow me to switch between color schemes with a hotkey. I got it to successfully load a color scheme and apply it, but it's very slow. Here's the code that applies a scheme: // The Theme class…
4
votes
1 answer

How to programmatically create an ASP.NET MVC project?

For my project, I need to create programmatically a MVC solution and project. I've already search and I've found a way to create a Console Application using Solution2 and EnvDTE80. This is the code : string commonName = "ConsoleAppProg"; string…
Axeen
  • 270
  • 1
  • 2
  • 7
4
votes
1 answer

Visual Studio 2010 add in - events not triggered

I have written an add in that takes the active document as a parameter. So each time that the active document has changed, I need to know. To do so, I wanted to use "Events.DocumentEvents.DocumentOpened" event of the DTE2 object. But the problem is…
SlimShady
  • 71
  • 3
4
votes
2 answers

Interop type 'ProjectKinds' cannot be embedded. Use the applicable interface instead

I´m developing a visual studio extension, but unfortally I can´t check the project kind , please look de follow code: if (project.Kind == EnvDTE80.ProjectKinds.vsProjectKindSolutionFolder) { …
Igor Monteiro
  • 933
  • 1
  • 11
  • 29
4
votes
1 answer

In EnvDTE's Debugger.GetExpression method, what does "UseAutoExpandRules" mean exactly?

The documentation poignantly explains that this parameter should be "true if the auto-expand rules should be used; otherwise, false.", but what does it mean exactly? I can't seem to find any explanation online.
Omer Raviv
  • 11,409
  • 5
  • 43
  • 82
4
votes
2 answers

Getting "Index was outside the bounds of the array." while calling EnvDTE80.ErrorItems.item()

I was trying to get all the error in the Visual Studio 2015 Error List window but I am getting an index out of bound exception while trying to access the ErrorItem through errors.Item(i) call. Am I missing any casting ? EnvDTE80.DTE2 dte2 = …
vrnithinkumar
  • 1,273
  • 1
  • 11
  • 29
4
votes
1 answer

How do I set the Project's 'Start External Program' setting programmatically?

I have an IWizard which gets access to a Project variable. What code do I need to write to set the 'Start External Program' value in project properties?
Dmitri Nesteruk
  • 23,067
  • 22
  • 97
  • 166
4
votes
2 answers

Automate db connection for a Visual Studio sql document

When you edit a sql file in the Transact-SQL Editor in VS, you can push the connect button to bring up a db connection dialogue. How can I automate this from a VS extension? I can catch the fileOpen event no problem. Does anyone know where in DTE…
bbsimonbb
  • 27,056
  • 15
  • 80
  • 110
4
votes
2 answers

Import/Export VS settings programmatically?

Is there a way to import/export Visual Studio settings via a Visual Studio Extension, i.e., via the Visual Studio API? I want to export some specific settings to a local file, just like the VS Import and Export Settings Wizard does, however, without…
D.R.
  • 20,268
  • 21
  • 102
  • 205
4
votes
1 answer

Change Debug property of a Visual Studio project programmatically using EnvDTE

Is it possible to change the Debug property of a project programmatically using EnvDTE classes? I know how to get the DTE instance, but I don't know how to change the value of this option. I need to change this property to be able to…
4
votes
2 answers

How can I get only classes defined in the current project in EnvDTE?

I've got a Package for Vs2010 that currently follows EnvDTE=>Solution=>Projects=>CodeModel=>CodeElements to do the following recursively and find classes var q = elements.Cast() .Where(x => x is CodeClass || x is…
Maslow
  • 18,464
  • 20
  • 106
  • 193
4
votes
0 answers

Change tab color - SQL Server Management Studio Add-in

I'm developing SQL Server Management Studio Add-in by EnvDTE, I want to change the color of the tab based on user setting (Something Like TabsStudio) in WindowCreated event like following. private void WindowCreated(EnvDTE.Window window) { //…
4
votes
2 answers

How to block on a OpenFile in a Visual Studio addin

I have a Visual Studio 2008 addin that when I press a certain hotkey, it opens a specific file (different based on the context of the hotkey) and then searches that file for a specific string (again, context dependent.) Most of the time this works…
Daniel Jennings
  • 6,304
  • 3
  • 32
  • 42
4
votes
1 answer

Determining if a EnvDTE.Project is available

I'm having to go through a big solution that contains unavailable projects. These unavailable projects are unavailable because their paths don't exist anymore. If this solution were to keep these unavailable references, would there be a way to…
Kraven
  • 233
  • 2
  • 11
4
votes
1 answer

Create or Get Solution folder in NuGet Init.ps1

I am trying to create an Init.ps1 script for a NuGet package which adds items to a solution folder which may or may not already exist in the solution. The script successfully adds or replaces the files in the filesystem and if there was no such…
Danny Varod
  • 17,324
  • 5
  • 69
  • 111