Tyrrrz / CliFx

Class-first framework for building command-line interfaces
MIT License
1.48k stars 60 forks source link

Publishing an exe as "PublishSingleFile=true" with version 2.3.4 fails #137

Closed C302 closed 1 year ago

C302 commented 1 year ago

Version

2.3.4

Platform

win-x64

Steps to reproduce

publishing an exe cli as "-r win-x64 -p:PublishSingleFile=true --self-contained true" with 2.3.3 works, but fails with 2.3.4

Details

image

Checklist

Storm-BE commented 1 year ago

The error above is only shown when running the publish output, not during publishing itself. In version 2.3.3 it would just use app as default application name. Since 2.3.4 it's throwing an exception: https://github.com/Tyrrrz/CliFx/commit/013cb8f66b29eec053f3b7bdf10825af963f990d#diff-361596653884e3c0d67c7cd24364bb61ee79ae6385f20171ce302bff881f758eR246

Tyrrrz commented 1 year ago

Yes, I removed the fallback because I wanted the user to be aware that the name could not be resolved. In order to specify the application name explicitly use the methods on the CliApplicationBuilder instance.

Unless I'm missing something and it's actually possible to retrieve the entry assembly when publishing a self-contained binary, I'm going to close this as it's not actually a bug.