tags:

views:

286

answers:

2

I was wondering if it is possible to execute 'Run Custom Tool' on a file in the VS Solution? I have the ProjectItem object already.

info: C#, Visual Studio 2010 SDK

+1  A: 

You'll need to ensure that the ProjectItem is selected, and then run:

DTE.ExecuteCommand("Project.RunCustomTool")
Aaron Marten
Perfect, thank you
Phill Duffy
A: 

Try to case the Object property value of ProjectItem to a VSProjectItem. If not null, simply call RunCustomTool() on it.

Peli