Open ardove opened 5 years ago
I don't believe this is something that we can do, unless you package your own executable. The executable for the global tool is generated on the fly when the global tool gets created.
cc @wli3 to confirm.
Well I’d imagine you would know what the entry point artifact is at build/pack time, so you’d need to store the metadata about product version in the produced nupkg at pack time so you could use it at runtime.
Why do you need this feature? Perhaps understand your customer needs we can either provide you with an alternative (like I said, packaging your own exe would be one way to solve this and we can provide guidance) or we can better prioritize this work.
Right now, this is not something that I believe we would spend effort on.
I don't need it, though I could see uses for it. Perhaps automatically enabling a "-version" parameter for all global tools (that could be extracted from the running exe).
I was more reporting it from what I'd consider a correctness perspective.
It may not be impossible to do it. During the install time we could try to copy such information from the entry point dll. Although i am not sure that is the right thing since it is still not determined by the producer. To be more "correct", producer could prepackage the shim in the nupkg following this doc. So the shim(the exe) is also under the control of the user. I can be done today. However, we don't have an easy way for producer to do it.
Steps to reproduce
Expected behavior
Product version should be 0.0.1 and file version should be 0.0.1.0
Actual behavior
Product version and file version are blank
Environment data