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

Get Saved Event Visual Studio DTE

I'm using COM DTE in order to make an application where, when a document in a Visual Studio Solution is saved, a certain action is executed. For instance if a document in the solution is saved, a new compilation is triggered. I'm using C++ but the…
Matt
  • 31
  • 4
0
votes
0 answers

EnvDTE in c#: how do i add parameters to a generated c++ function?

I am trying to generate a function with parameters. adding the function header and body works fine, but when I try to add parameters I get an exception that I haven't been able to solve. func.AddParameter("num", "int"); I get the exception: Failed…
0
votes
1 answer

Why aren't all EnvDTE assemblies Primary Interop...I'm COMfused?

I'm trying to understand how the Visual Studio EnvDTE Interop Assemblies work, and why they have been designed this way. New assemblies contain updated/new interfaces, and the recommendation by Microsoft is to use the most recent interface in…
FakeSaint
  • 492
  • 5
  • 8
0
votes
1 answer

Powershell dte create project of targeting platform

PM> $dte.Solution.Create("C:\Projects\test\", "test.sln") PM> $t = $dte.Solution.GetProjectTemplate("ConsoleApplication.zip", "CSharp" ) PM> $dte.Solution.AddFromTemplate($t, "C:\Projects\test\proj\", "New CSharp Console Project", $false) I'm using…
Bakudan
  • 19,134
  • 9
  • 53
  • 73
0
votes
2 answers

How to get /MP option of VC projects using EnvDTE?

I'm developing Visual Studio Add-in to modify VC projects, and I'd like to get/set /MP option (Multi-processor compilation option). But I can't seem to find the property to change it. Where is the property for /MP?
Daisuke
  • 21
  • 2
0
votes
1 answer

How can I detect an unmanaged C++ project in a visual studio extension

In my Visual Studio Extension, I need to detect whether a C++ project is managed or unmanaged code. Previously, I had a satisfactory method, described in this posting in an MSDN forum. In that example, it was necessary to get the ManagedExtensions…
Phil Jollans
  • 3,605
  • 2
  • 37
  • 50
0
votes
1 answer

Skipping solution folders in TT automation script

I have a Text Template snippet which generates a Solution class with an Assemblies property to list all project assemblies in the Visual Studio solution to help with IoC container configuration (GitHub, NuGet). It fails when projects are placed in…
Dmitry Nogin
  • 3,670
  • 1
  • 19
  • 35
0
votes
2 answers

Visual Studio Extensions - How to create a SolutionFolder inside a SolutionFolder?

According to what I can find here it is not possible to add a SolutionFolder inside a SolutionFolder: Visual Studio 2005 and higher allows you to add folders to the solution (which are called solution folders), not only to add folders to a…
0
votes
3 answers

Add item to Error List in Macro

I want to notify the user of the macro if something went wrong during the execution of the macro. I was wondering if it would be possible to add an item to the Visual Studio error list? It is possible to do so from within an AddIn (like here), but I…
m0sa
  • 10,712
  • 4
  • 44
  • 91
0
votes
1 answer

Adding controls to a form when I only have the reference to it’s EnvDTE

I am writing na Add-In for Visual Studio 2010, and I want it to add controls to an existing Form in an existing Project in an existing Solution, and I already have references to all of them. As I have the reference to the Project Item that…
JohnDoe
  • 63
  • 6
0
votes
0 answers

Tangible TemplateFileManager Error

I was trying to use the TemplateFileManager TT Include file (referenced from this article, and available in Tangible's template gallery) so that I could output multiple files from 1 T4 template, but I keep getting an error inside the default code. …
Brian Mains
  • 50,520
  • 35
  • 148
  • 257
0
votes
1 answer

How do you programmatically run Static Code Analysis in Visual Studio 2017?

I'm working on a solution to localize legacy applications. I've written a Visual studio add-in using EnvDte that automates the process of setting the "Localizable" flag for every form in the solution to true, which is a critical step for extracting…
0
votes
0 answers

How to quickly or bulk add items to a Visual Studio project

I have a visual studio extension that needs to add a large number of files to my project (~50,000) I am using EnvDTE.Project.ProjectItems to manipulate the project Using AddFromFile is very slow (>30 minutes to complete) I can not use…
tx34
  • 124
  • 7
0
votes
1 answer

How to automatically run code / commands after files are saved in visual studio 2017

I have the following scenario: My solution in VS 2017 includes some python files which other and I often edit. How can I achieve that every time I save one of these open .py files, some code or .bat file (or whatever is most convenient in your…
felisimo
  • 198
  • 14
0
votes
1 answer

How to install Nuget Packages using ENVDTE.DTE

I created one console application to create visual studio project pragmatically, here i am not able install Nuget packages, always var componentModel = (IComponentModel)Package.GetGlobalService(typeof(SComponentModel)); statement returns null…
Gopinath2105
  • 35
  • 1
  • 7