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

EnvDTE.DTE create empty C++ project for Visual Studio 2015

I am trying to create a Visual C++ Empty project programmatically with EnvDTE. But composed project folder does not include vcxproj and vcxproj.filter files. Due to the fact when I open that solution at Visual Studio, file structure is corrupted.…
Yunus
  • 731
  • 1
  • 11
  • 26
3
votes
2 answers

Visual Studio 2015 - EnvDTE Read ErrorList

I'm about to create a small Build Tool. The only things it should do: Try to Build the Solution and output the errors. But not I have the following problem: In case the Build fails I cannot read the ErrorList. The program gets stuck and waits until…
SyLuS
  • 103
  • 1
  • 10
3
votes
0 answers

How to get a programmable interface to the Visual Studio Call Stack window?

I am working on a Visual Studio add-in (part of the ILSpy open source project) and I want to get information about the currently selected stack frame in the Visual Studio Call Stack window. I tried this: var callstackWindow =…
yoyo
  • 8,310
  • 4
  • 56
  • 50
3
votes
2 answers

Get process id from DTE (EnvDte)

Is it possible to get the process id of a visual studio instance through the DTE mDte variable? Refer to code below. private static DTE mDte; public static void OpenVisualStudio() { Type visualStudioType =…
Lasse
  • 51
  • 5
3
votes
0 answers

Access EnvDTE from msbuild code when building in Visual Studio

When I do a build from Visual Studio, on post-build I execute a PowerShell script from MSBuild using the PowerShell MSBuild Task (http://powershellmsbuild.codeplex.com/). In this PowerShell code I would like to add/modify items to my project using…
Serge van den Oever
  • 4,340
  • 8
  • 45
  • 66
3
votes
4 answers

Visual Studio Extension: Access VS Options from arbitrary DLL

I'm currently developing my first VS extension, which needs to provide some options to the user. Following https://msdn.microsoft.com/en-us/library/bb166195.aspx, it was rather easy to come up with my own options page. However, I have not yet found…
csoltenborn
  • 1,127
  • 1
  • 12
  • 22
3
votes
2 answers

How to programmatically reload an existing unloaded c# project with IVsSolution.CreateProject

I'd like to add two buttons to my studio extension which unload/load all test projects of an open solution. After a lot of hassle, the unload works fine. Now I still have troubles loading them. Somehow I cannot figure out how to correctly use…
Robin Holenweger
  • 321
  • 3
  • 14
3
votes
2 answers

How can I listen for the deletion of a ProjectItem via DTE?

I've got a designer that relies on the existence of other solution items. If one of those items is deleted the designer crashes and you have to edit as XML to fix. Not exactly user friendly. I do, however, have the DTE object representing the…
user1228
3
votes
0 answers

Resource files falsely enumerated as part of project

We have a localized WinForms application. When we get translations from 3rd party, new *..resx files appear in the project folders and need to be added to the projects. For common resource files, e.g. Properties\Resources.de.resx, nothing changes…
tom-englert
  • 261
  • 2
  • 5
3
votes
1 answer

Current type of the build action from Visual Studio - Microsoft.VisualStudio.Shell.Interop

In some extension we implement the IVsUpdateSolutionEvents2 and IVsSolutionBuildManager2 used for registering caller with the AdviseUpdateSolutionEvents For example, this called before any build actions have begun: public int…
3
votes
1 answer

Visual Studio Extension Package - Custom File Type - Editor and Icon

currently I am adding a custom file type (.cft for example) to my Visual Studio project using and instance of the project (EnvDTE.ProjectItem) and the method AddFromFile(".cft"). No my question is how can I tell Visual Studio to use the standard XML…
Fionn
  • 10,975
  • 11
  • 54
  • 84
3
votes
1 answer

Create new c# project files from code

I'm currently working on an application that will generate actual .cs and .xaml code files and add them to a project. I've managed to do this by manually editing an existing .csproj file and thats working well. However I would like to be able to…
Shaboboo
  • 1,347
  • 1
  • 16
  • 35
3
votes
2 answers

Get the GUID of .proj file using C#

I need to get the GUID of a C# .proj file using C#. I have taken from the .proj file like reading the file using XML and getting the tag value. //XML Tag {7701AEB4-8549-4FB2-B34C-E71D0B7DE59D} But i need to know is…
A Coder
  • 3,039
  • 7
  • 58
  • 129
3
votes
1 answer

Changing Project Metadata in Visual Studio 2013 C#

I've got a Visual Studio 2013 package written in C# where I need to make some changes in the items and their attributes in a C++ project file while Visual Studio 2013 is running and has the project loaded. Actually, it could also be OK to save the…
Shakaron
  • 1,027
  • 10
  • 24
3
votes
3 answers

Using EnvDTE and VSLangProj in powershell :

I have a solution with 1 web application project. I'm trying to add three c# class library projects to it and then add project references of these three projects to the existing web application project. I'm doing this using powershell. I'm able to…
Chris
  • 49
  • 4