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
1
vote
1 answer

How do I get the "LocalPath" for a linked ProjectItem?

Using T4, I'm trying to get the full path of a linked ProjectItem. I'm only able to get the "source" full path. I'd like to get the full path of the "target" project (that is, the project which links the original file). How do I do so? I've spent…
Esteban Araya
  • 29,284
  • 24
  • 107
  • 141
1
vote
1 answer

How do you change the BuildAction of a C# project file using an enumeration in Powershell?

I found this question and this answer on how to set the BuildAction (using Powershell) of a file in a C# Project. Basically, get the specified item, then set the Value of the "BuildAction": $item = $project.ProjectItems | where-object {$_.Name -eq…
myermian
  • 31,823
  • 24
  • 123
  • 215
1
vote
1 answer

Powershell script that lists where class property is used

I am trying to write a script that can provide me with a list of all classes/methods that (in my Visual Studio 2013 C# solution) use a specified class property - with similar output as ReSharpers "Find Usages" command, but then run as a PS script or…
Lucien Dol
  • 79
  • 1
  • 1
  • 4
1
vote
1 answer

Accessing .vsprops (Property Sheets) via VS Automation and Extension

I am trying to access user macros that are defined in a .vsprops (Property Sheet) that is used by a Visual Studio 2008 project. I cannot find any documentation on accessing any information in a .vsprops file using VS automation and extension…
madhatter160
  • 439
  • 5
  • 13
1
vote
1 answer

How do can I programmatically automate the comparison of Visual Studio Solution Files?

We have a solution file that contains multiple solutions since we have a lot of developers working on various parts of our application. Developers generally update the individual solutions but they won't update the main solution file. I would like…
Jim MacDiarmid
  • 79
  • 1
  • 10
1
vote
1 answer

VS SDK ContentType does not work

I am trying to include a custom language support for Visual Studio. To start with, I need to have GoToDefinition support. And I am struggling to get the context menu to include this command. I have defined a ContentTypeDefinition and have included…
1
vote
2 answers

TSqlObject has no ContextObject property?

I'm attempting to create a T4 template that generates source code for calling stored procedures that are contained in another project in my solution. I am able to successfully enumerate the .sql files in the solution, add them to a TSqlModel, and…
Mark
  • 11,257
  • 11
  • 61
  • 97
1
vote
2 answers

Why dte.MainWindow throw a NullRefEx in VSIX Package Initialize method?

I am converting a VS Addin to a VS Package. I have this code in my VSIX Package class(that derives from Microsoft.VisualStudio.Shell.Package) protected override void Initialize() { base.Initialize(); var dte = this.GetService() as…
Patrick from NDepend team
  • 13,237
  • 6
  • 61
  • 92
1
vote
0 answers

How to get the name of a Service from a service project (maybe using DTE?)

so i am using T4 templates to generate a script. one part i just came up against is getting the name of a service so that i can generate the sc.exe call to start the service. I am getting to a lot of the info needed from the projects using DTE and…
workabyte
  • 3,496
  • 2
  • 27
  • 35
1
vote
1 answer

How to work out TFS uri and location for currently loaded solution projects in Visual Studio Extension

I am trying to work out how, in my Visual Studio Extension, I can work out which of the currently loaded projects are in TFS and then the TFS server uri and location for each of these projects. I would like to be able to do something like…
Kram
  • 4,099
  • 4
  • 39
  • 60
1
vote
2 answers

C# equivalent of the C++ custom project Wizard

I have an existing wizard template created for VC++ from year back, ported to VS2008. It uses the custom wizard jscript/html templating system and DTE object. I've used this successfully for years, but now I want to create an entry for a standard C#…
gbjbaanb
  • 51,617
  • 12
  • 104
  • 148
1
vote
1 answer

EnvDTE - Edit project dependencies in the .sln file

I'm writing a Visual Studio Wizard Template using c# on visual studio 2012. I followed the MSDN steps: I created a VS template, then I created a Class Library project with a class which implements the IWizard interface, I configured the .vstemplate…
user1835297
  • 1,059
  • 2
  • 12
  • 24
1
vote
1 answer

OnBuildBegin does not fire in Visual Studio Macro until I run it from Macro Explorer

I have the following Visual Studio Macro: Imports System Imports EnvDTE Imports EnvDTE80 Imports EnvDTE90 Imports MyMacros.EnvironmentEvents Imports System.Diagnostics Public Module Module1 Private WithEvents buildEvents As EnvDTE.BuildEvents…
Luhmann
  • 3,860
  • 26
  • 33
1
vote
1 answer

Parsing code-model from in-memory C#-code string

With EnvDTE.ProjectItem, is it possible to parse an in-memory C#-code string to get the FileCodeModel? I don't want to alter the project file in this course by adding a temporary file to project, get its ProjectItem, do stuff and then delete the…
1
vote
0 answers

Does Visual Studio offer a way to catch an add/remove/edit Reference event that isn't specified for only C# or VB projects?

I found this documentation in the MSDN Library: http://msdn.microsoft.com/en-us/library/ms228956.aspx It specifies a way to catch Add, Edit, or Delete Reference events within Visual Studios. However, this only works for C# and VB projects. I have…