Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Currently opened file name as parameter #51

Open
Wastus opened this issue Jan 5, 2021 · 4 comments
Open

Feature Request: Currently opened file name as parameter #51

Wastus opened this issue Jan 5, 2021 · 4 comments

Comments

@Wastus
Copy link

Wastus commented Jan 5, 2021

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.

@yannduran
Copy link

yannduran commented Jan 26, 2021

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:

image

This would allow me to get rid of the post-build event shown above, which is slowing down my build quite a bit.

@Wastus
Copy link
Author

Wastus commented Jan 28, 2021

That is a different issue, and there is a merged pull request here: #13 which looks like it should be doing what you want.

@yannduran
Copy link

@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!

@Wastus
Copy link
Author

Wastus commented Jan 28, 2021

@yannduran no worries and happy to have helped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants