I’m on my first steps on learning the .Net development environment, after several years of developing in the .Net framework environment.
One thing I can’t manage to understand is, assuming I have a solution of several library projects, some of the projects reference other projects in the solution, some are not. Additionally some of the projects depend on 3rd party dependencies (NuGet packages and some other external dlls).
How can I publish all my libraries, so external application (which is not necessarily mine, and not necessarily a c# application, e.g matlab code that calls the libraries) can use these libraries without runtime errors of missing dependencies. Must I publish each project individually? Or must I mark each and one of the project as ‘self contained’?
(I know that the machine that will use those libraries has the required dot net runtime so I don’t see any reason for the ‘self contained’ option)
I saw that some people use a hack where they add an “empty” console application that reference all the libraries and then publish only it, but I dont see how is that even a valid solution?
What am I missing here?
Extra question: Assuming I’m installing some nuget package from nuget.org and publish my project with the deps.json file. According to this, the .Net runtime that run the application/library will be able to restore the nuget package. How is that possible? If I have a machine with the .Net runtime installed, is it means that all nuget packages on nuget.org are on the machine???