Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

How do I get the equivalent of $(ProjectDir) and $(ProjectFileName) in an add-in?

$
0
0

I have migrated a tool from an "External Tool" (ie stand-alone exe file which is configured using the External Tools command in the Tools menu) to an add-in.

The external tool gets the active project using the  $(ProjectDir) and $(ProjectFileName) macros on the command line.

In the add-in, I've tried using _applicationObject.ActiveSolutionProjects, but this returns the project(s) currently selected in the solution explorer, which is not the same.

If a project is selected and a source file from another project is active, the macros gives the name of the project of the active file, not the selected project(s).

Is there a way to access the same "active project" as the ones returned by the macros?

Note: The project I'm looking for is the one displayed in the Build menu, for the Build Project commands.

Regards,

Måns Vestin, RaySearch Laboratories



Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>