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

CodeSmith.Insight.ClientError CodeSmith 5.2

Can someone help me with this problem?. I have been having with CodeSmith 5.2. Not sure if I messed up something with visual studio..I just right click and manage or Generate output and this error occurs If I try to open CodeSmithapplication and…
user575219
  • 2,346
  • 15
  • 54
  • 105
0
votes
1 answer

How to get the path of a project using EnvDTE

Big picture: I am working on an Extension Tools for Visual Studio 2015. Currently I have a Member Finder windows form responsible to display all the Methods and Properties inside a project. Problem I also need to display the physical path of the…
0
votes
0 answers

Using T4 template to create View with custom Html control

I have created view model class like bellow public class GenericFormModel { public string SimpleInput { get; set; } public string InputAddOn { get; set; } public string InputTextArea { get; set; } public DateRange Date { get; set; } …
P John Raj
  • 537
  • 1
  • 4
  • 17
0
votes
0 answers

Visual Studio Extension Build Solution error 0x

I have this code for clean, build and run solution as Visual Studio Extension Dim dte As DTE = Activator.CreateInstance(Type.GetTypeFromProgID("VisualStudio.DTE.14.0")) Dim sb As SolutionBuild = dte.Solution.SolutionBuild sb.Clean(True) '…
0
votes
1 answer

failed to initialize DTE object

I am following a code sample in this link. I hit a snag right on the second line: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using…
CaTx
  • 1,421
  • 4
  • 21
  • 42
0
votes
1 answer

Accessing properties of a project using EnvDTE

I'm writing a visual studio add-in to automate some of our BizTalk related tasks. I'd like to be able to access the property values of a project (not what shows in the default 'Properties' pane. The properties shown in a window if you right click on…
Jay
  • 13,803
  • 4
  • 42
  • 69
0
votes
1 answer

EnvDTE parsing function code [longer]

I'm trying to analyze C# project source code via VisualStudio's EnvDTE COM. The desired task is to: Locate CodeClass with given name within the project structure. [done] Find all its public {get; set;} properties. [done] Locate its public…
sharpener
  • 1,383
  • 11
  • 22
0
votes
1 answer

Get the current document viewport in Visual Studio

I am writing a VSPackage. I need to get the text from the current document in the Visual Studio, edit the text and write it back to the current open document. When I do this, the current viewport of the document jumps back to the top of the…
A-Sharabiani
  • 17,750
  • 17
  • 113
  • 128
0
votes
1 answer

What is the correct way to subscribe to the EnvDTE80.DTE2.Events2.PublishEvents.OnPublishBegin?

I'm porting an VS addin to a VS Package. The package subscribes to OnBuildBegin and OnPublishBegin when the package is initialized. Visual Studio triggers OnBuildBegin as expected, but OnPublishBegin is never called. More or less the same code work…
Ben
  • 3,255
  • 1
  • 26
  • 32
0
votes
1 answer

Powershell and PMC $dte.ActiveWindow.Object.GetItem error

I am trying to write a powershell script to reload a project (files and folders have been added to it via a C# app (tried to do this via C# but failed, see here). My end goal is to be able to call the C# app then reload the project (unload and…
Jon
  • 15,110
  • 28
  • 92
  • 132
0
votes
1 answer

EnvDTE Remove class attribute

I have a very simple query (EnvDTE), "how do I remove an attribute from a class". [Authorize] class SomeController { ... } I tried - authorizeAttr.StartPoint.CreateEditPoint().Delete(authorizeAttr.EndPoint); it works but leave empty square…
0
votes
1 answer

Programmaticaly add file as a link in C# project from inside visual studio add-in using EnvDTE API

I am working on a Visual Studio add-in which as part of its functionality has to modify existing C# project by adding (and removing) project items that are links to files outside project's tree. I do not seem to find a way to insert a link to a file…
0
votes
1 answer

How to open the TFS "View History" window from a VSPackage?

I'm writing a VSPackage for Visual Studio that contains a tool window to display a list of items from TFS. When one of the items is clicked, I'd like to open the "View History" window. How can this window be opened programmatically?
Glen Hughes
  • 4,712
  • 2
  • 20
  • 25
0
votes
1 answer

Attach Asp.Net MVC application to iisexpress in C#

I developed a visual studio package plugin and today I need to implement the attach to iisexpress in C#. My plugin builds the project of active document in visual studio editor from a button in context menu, and in the end of the routine, I need to…
0
votes
1 answer

ItemAdded Event in Visual Studio: Get item AND project

I develop a tool, which recognize changes made in a Visual Studio solution. Therefore, I use dte Events like solutionEvents.ProjectRemoved += cV.OnProjectRemoved; solutionEvents.ProjectRenamed += cV.OnProjectRenamed; projectItemsEvents.ItemAdded +=…
user2550641
  • 317
  • 4
  • 18