I want publish .NET Core 3.1 project as self-contained. All build, saves, but in root folder so many dll like System.Collection.dll
, System.IO.dll
etc. How put these libs in custom folder?
Asked
Active
Viewed 976 times
2

Denis Klimov
- 21
- 2
-
That doesn't work without extra work on your end to find them again later. It's best (and by far easiest) if you just leave it the way it is. Why do you care? – PMF Feb 04 '22 at 09:50
-
Pre .NET Core you were able to use the probing paths in the .exe.config. IIRC that doesn't work in .NET core anymore but [there seems to be a workaround](https://stackoverflow.com/questions/56844233/additional-probing-paths-for-net-core-3-migration). – devsmn Feb 04 '22 at 09:59
-
Sad news that is doesn't work... Ok, thanks! – Denis Klimov Feb 04 '22 at 10:09
-
@PMF, I care because I'm going to hand this off to somebody, and it is a huge pain to say, "Go find this one .exe to run amid the clutter." If I could push all of those runtime DLLs to another location, like a lib folder or something, the burden on people using it is easier because there's like one Program.exe (or at least far fewer files). I think there's an extremely compelling reason to care. – rbwhitaker May 25 '22 at 15:46
-
I see, that makes sense. Have you tried single-file-publishing? https://learn.microsoft.com/en-us/dotnet/core/deploying/single-file/overview I have not used this before, so I don't know how well it works. – PMF May 25 '22 at 16:04