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

Launch debugger from VSIX and trigger method on project in current solution

I am trying to build a VSIX extension which Starts debugger in currently selected project and runs a method within that project. I am able, using reflection to instantiate and call the method. However I would like my extension to start the debugger…
Danhol86
  • 1,352
  • 1
  • 11
  • 20
0
votes
0 answers

How to change the .NET version in an EnvDTE-generated Console Application

I'm fairly new to using EnvDTE, but I've managed to get it to generate a project using a copy of the Visual Studio-included csConsoleApplication template*. Problem is, I need it to be a net6.0 app, not .NETFramework v4.0, which is what's being…
Logix
  • 530
  • 6
  • 15
0
votes
1 answer

Is there a way to save EnvDTE Project global variables to the vcxproj.user file rather than the .vcxproj file?

As the title states, I'm trying to save data to the user file (projectname.vcxproj.user) rather than the project file (projectname.vcxproj) Reading the variable (or initialising it) is done like this: var globals = project.Globals; string readValue…
tobaroony
  • 35
  • 3
0
votes
0 answers

Programmatically go to the start of a function definition after opening a file in Visual Studio with help of DTE

Firstly I am able to open a particular file programmatically in Visual Studio editor, with the help of How to programmatically open project/solution in already running Visual Studio?. var dte = Package.GetGlobalService(typeof(_DTE)) as DTE2; …
Siddhi Kamat
  • 135
  • 2
  • 11
0
votes
1 answer

Use EnvDTE in a vsix extension to add a reference to a shared project in a multi-project template solution

I have created a Visual Studio multi-project template in which one is a 'Shared' project, and another is a normal project for common 'Resources'. The other 5 normal projects each need to reference both the 'Shared' and the 'Resources' projects. On…
0
votes
3 answers

VisualStudio API: include existing folder without recursively adding all the contents?

Currently I'm using: EntDTE.ProjectItems.AddFromDirectory() to include the existing folder into VS project model, but this method includes into project all the contents of this folder too. Can folder can be simply added into project without adding…
controlflow
  • 6,667
  • 1
  • 31
  • 55
0
votes
1 answer

Open a file in solution explorer with a relative path by a shortcut key

Is there a way to select/open a file from the solution explorer with a shortcut key? In all my projects I have a file named Note.txt, it can be found in Project\Info\Note.txt. Want to assign a shortcut that when we hit it, it select and open the…
Kasrak
  • 1,509
  • 4
  • 24
  • 48
0
votes
1 answer

What's the GUID of the docked "Find" window in Visual Studio 2019?

I'm trying to close the docked find window in Visual Studio 2019 via a DTE script. This is the window I'm talking about: Image of the window I'm talking about here I thought it would be "vsWindowKindFindReplace" but I just get a null when I try to…
KiraHoneybee
  • 495
  • 3
  • 12
0
votes
1 answer

Is it possible to use VS Shortcut as a Event In c#

Looking to create a Hot Custom hot reload feature. I need to create an Event They should be able to listen to the Save command. Assume there are two projects in the same solution. Solution: Project A Class test Project B When I change something…
ish1104
  • 401
  • 4
  • 19
0
votes
0 answers

Getting the StartArguments from a VSIX plugin for .NET Core projects

EDIT - Looks like the initial problem only applies to .NET Core projects. So the question shifts to "What is the correct way to get the full range of project properties from .NET Core projects?" I'm writing a Visual Studio 2019 plugin that uses…
Jason Weiler
  • 81
  • 1
  • 5
0
votes
1 answer

Get instance of IMonitorSelectionService for Visual Studio Sequence Diagram

I'm trying to create a Visual Studio extension that works alongside the Sequence Diagram Designer, and I'd like to be able to register for an event that will notify me whenever the selection changes on the diagram. The IMonitorSelectionService…
shader
  • 801
  • 1
  • 7
  • 25
0
votes
2 answers

How can I force a cast from EnvDTE.Thread to System.Threading.Thread?

In a VS extension project, I am trying to create a mapping of the process threads, cast as both EnvDTE.Thread (to access the Freeze and Thaw methods), and System.Threading.Thread (to access the ManagedThreadId property). It should ideally be as…
Erwin Mayer
  • 18,076
  • 9
  • 88
  • 126
0
votes
1 answer

How can you detect a XAML designer window in a VSPackage

In my VSPackage I have an event handler for the WindowActivated event on the EnvDTE.WindowEvents interface. In my code I check whether the activated window is WinForms designer with (in VB.NET) If TypeOf GotFocus.Object Is IDesignerHost Then …
Phil Jollans
  • 3,605
  • 2
  • 37
  • 50
0
votes
1 answer

When using EnvDTE in Visual Studio, where are the DTE.Globals persisted variables actually stored?

From the Globals.VariablePersists Property documentation: If the global variable is associated with the Solution object, then the value is saved in the solution (.sln) file. The values are saved any time the environment writes the .sln file. When…
Spinicoffee
  • 171
  • 2
  • 8
0
votes
1 answer

Is there any NuGet API to create a Package from a Visual Studio Extension project

I am looking a api that helps us to create NuGet package from a vsix project. I found apis used for installation of Package like - NuGet.VisualStudio. Please let me know if there is any similar api for creation and publish of a package as well. I…