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

Visual Studio - EnvDTE.DTE.Solution.Open does not add solution/project to recent list

After opening a solution programmatically with EnvDTE.DTE.Solution.Open there is no entry in VS at File->Recent Projects and Solutions or at the StartPage under "Recent". Is possible to add the opened solution programmatically to the recent list?
killika
  • 72
  • 7
0
votes
1 answer

EnvDTE CodeClass.AddDelegate overload

I want to create 2 delegates with the same name but different parameters (overloaded delegate). When I try to add a delegate I get an error on the second try due to a delegate already existing. I tried to add it first with a temp name then add the…
Dustin Davis
  • 14,482
  • 13
  • 63
  • 119
0
votes
1 answer

Powershell EnvDTE Switch Visual Studio Session (Multiple Separate Solutions open)

Here is what I am trying to do... I have two separate Visual Studio solutions open, they are completely separate solutions, and I want it to remain that way. Solution 1 is what my powershell DTEObject is pointing to. I want to be able to switch to…
HeedfulCrayon
  • 837
  • 6
  • 20
0
votes
0 answers

Accessing Modules using EnvDTE90. Visual Studio Automation

I am using EnvDTE Interface for automation. I need to access the modules while debugging. I can access expressions, locals but I am unable to find anything related to modules. I need to access the modules in a particular frame. EnvDTE90 does have…
0
votes
0 answers

Trying to cast a DTE project to a VCProject causes an exception saying DLL not registered

I am using VS 2017 to write C# code that uses the DTE API to generate a Visual Studio solution with a set of cpp (vcxproj) projects. I can create the sln and vcxproj files ok, using a vcxproj template (from the VS 2017 samples). But when I try to…
Gordon Dakin
  • 51
  • 1
  • 3
0
votes
1 answer

unable to locate VCProject (Microsoft.VisualStudio.VCProjectEngine.dll) in VS 2017

Not getting VC Project in VS 2017. I am using VS 2017 to migrate one of the plugins already working in 2010. But on the build environment i am not able to Create VCProject Projects projs = appDTE.Solution.Projects; foreach(Project proj in projs) { …
0
votes
0 answers

System.IServiceProvider.GetService returns not null but cannot cast to specific type

I'm trying to test how my t4 template generates outside the context of my addon. I've looked at https://msdn.microsoft.com/en-us/library/68shb4dw.aspx and https://msdn.microsoft.com/en-us/library/bb166401.aspx to get the DTE and the…
0
votes
1 answer

How can I set custom MsBuild property from VSIX without writing into .csproj file?

I create a VSIX extension for Visual Studio, which adds a custom drop-down menu. I need the value from this menu to apply to the .csproj property of the file without changing the file itself, like the configuration menu. For…
R. Savelyev
  • 165
  • 1
  • 11
0
votes
1 answer

How to copy the Visual studio current line number

How to copy/get the current line number in the active document of Visual Studio using C#
123iamking
  • 2,387
  • 4
  • 36
  • 56
0
votes
1 answer

Project Template DTE Visual Studio 2017 nuget

I try to create a project automated with DTE this work perfect but i cannot add a nuget package... Option1 (InstallNuGetPackage code below) var componentModel = (IComponentModel)Package.GetGlobalService(typeof(SComponentModel)); //componentModel is…
live2
  • 3,771
  • 2
  • 37
  • 46
0
votes
1 answer

Access/Find all variables in an EnvDTE Document at Runtime (Visual Studio/C#/Extension)

I searched a long time but haven't found anything concrete about this. I write an Extension for Visual Studio and want to find all Variables/Properties in the ActiveDocument/Code Document in the open Project. Is there an "easy" way to get them or do…
0
votes
1 answer

EnvDTE is throwing an ComException when trying to get a property access modifier of a expression-bodied member

I have a VS extension project. In the project I need to traverse thru all class and find all public properties with public getters. the code looks like private static IEnumerable GetProperties(CodeElements props,…
Robert Raboud
  • 1,004
  • 8
  • 7
0
votes
1 answer

C# Get Configuration from DTE

I'm trying to build some kind of custom Configuration Manager for Visual Studio 2013. I've created a VSPackage MenuCommand and currently run it in an visual studio experimental instance. To get the projects of the current solution i use this: public…
boFFeL
  • 31
  • 5
0
votes
0 answers

Emitting events during debugging in Visual Studio

I want to be able to capture intellitrace style calls to a certain method during debugging of my app. Specifically, each time during debugging when MyLibrary.MyClass.MyMethod is called ideally i'd get a pane of sorts in Visual Studio that would…
zaitsman
  • 8,984
  • 6
  • 47
  • 79
0
votes
1 answer

Visual studio Add in to retrieve SSDT project settings

I need to write a visual studio add in targeting visual studio 2012, which will retrieve SSDT project properties which are configured in a SSDT project. Some properties can be retrieved by the below code…