Search code examples
c#vsx

Can you programatically execute 'Run Custom Tool' on a ProjectItem in C#?


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


Solution

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

    DTE.ExecuteCommand("Project.RunCustomTool")