CommandTaskRunner
CommandTaskRunner copied to clipboard
Feature Request: Currently opened file name as parameter
Installed product versions
- Visual Studio: 2019 Professional
- This extension: 1.3.62
Description
It would be nice to be able to pass the currently opened file path (relative or absolute would probably have both their use-cases) to the command. Currently I have a working batch-file which is able to do a single analysis of a source file and I'd like to integrate this into Visual Studio, but I'm unable to find a method to pass the currently opened file to a command.
I hoped this extension might help, but I haven't been able to get it to work in this way and looking at the source where the solution variables get substituted, it doesn't look like there is a variable available for it.
I would find it very useful if all of the following were supported:
- $(ProjectDir)
- $(OutDir)
- $(TargetName)
- $(ConfigurationName)
Like the macros in a pre/post-build event:
This would allow me to get rid of the post-build event shown above, which is slowing down my build quite a bit.
That is a different issue, and there is a merged pull request here: https://github.com/madskristensen/CommandTaskRunner/pull/13 which looks like it should be doing what you want.
@Wastus sorry about that. I thought I was just adding more use cases to your own suggestion.
Thanks so much for the link to the Support MSBuild environment variables in commands #13 pull request, I had no idea that CTR was already capable of doing that!
@yannduran no worries and happy to have helped.