bilal-fazlani / commanddotnet

A modern framework for building modern CLI apps
https://commanddotnet.bilal-fazlani.com
MIT License
560 stars 32 forks source link

UseVersionMiddleware not work when publish to .exe single file #418

Closed kashti3 closed 2 years ago

kashti3 commented 2 years ago

Hi,

I added the UseVersionMiddleware ability to my CLI project and when I testing it on a non publish ouput .exe file in seem to be work but will trying to test it after publish into a single file I get this result:

C:\CLI>[CliExeFileName] -v [CliExeFileName].exe The path is empty. (Parameter 'path')

drewburlingame commented 2 years ago

Thanks kashti3. Free time is hard to come by atm but I'll find some time to look into this over this during the week.

drewburlingame commented 2 years ago

Thankfully, MiloszKrajewski figured this out already for Spectre Console. https://github.com/spectreconsole/spectre.console/issues/242. I'll get an update pushed in the next couple of days.

Thank you @MiloszKrajewski

drewburlingame commented 2 years ago

this has been fixed and released in https://www.nuget.org/packages/CommandDotNet/6.0.3