✅ can you put dotnet publish *.dll in some library folder?
I was wondering if there was a way to tidy up result of executing
It produces tons of not only *.dlls but also some locale folders, can't i put them away in some libs and locales directory for example? I know there are
-p:PublishSingleFile=True
and trimming but there are some problems with them.19 Replies
The single file option works fine for me, what problems did you encounter?
this application refuses to start for some reason when I enable this and also the exe gets quite big (I know it's just packed dlls but doesn't look that great)
I was just wondering if there is option to manage them, for example in java using maven you can define where the dependencies are going etc so your output would be some libs directory and main.jar which would be equivalent to exe
This doesn't let you put dependencies in a separate folder AFAIK, but you can try it as an alternative:
https://github.com/Fody/Costura
GitHub
GitHub - Fody/Costura: Embed references as resources
Embed references as resources. Contribute to Fody/Costura development by creating an account on GitHub.
Unknown User•9mo ago
Message Not Public
Sign In & Join Server To View
Well yeah, they are put in the same directory as executable. I'd like to move them so potential user could see exe without scrolling for a few seconds
Unknown User•9mo ago
Message Not Public
Sign In & Join Server To View
Unsupported for wpf as it uses reflection as per docs
Unknown User•9mo ago
Message Not Public
Sign In & Join Server To View
Okay thanks, I was mostly asking if there was another way to manage it - it's not a deal breaker as the app still works 😁
And yeah I'll be trying to rebuild the project in avalonia. When I was testing default project it could be packed to single file and trimmed nicely
Unknown User•9mo ago
Message Not Public
Sign In & Join Server To View
"potential user could see exe without scrolling for a few seconds" can be an invalid requirement. Why should you ship a folder of files to end users, but not installers which create system shortcuts?
Unknown User•9mo ago
Message Not Public
Sign In & Join Server To View
@BartShoot if all you're doing is single file without trimming you should be able to do it by including IncludeNativeLibrariesForSelfExtract to true in your csproj
also u can't use NAOT if available
Unknown User•9mo ago
Message Not Public
Sign In & Join Server To View
yes its not supported but you can still do single file is my point
Unknown User•9mo ago
Message Not Public
Sign In & Join Server To View
ah ok I guess I missed it along the road of texts here 😉
I remember having to do IncludeNativeLibrariesForSelfExtract for WPF to work for me
Use the /close command to mark a forum thread as answered