I know for example if any type in a referenced assembly is used by the project this assembly won't be loaded.And this reference is used in the build time(for example using a constant in that assembly).Can you please enumerate the different scenarios when we use a referenced assembly and it is not loaded by the project like the example of the constant that I gave. and what we call this type of dependencies please.
Asked
Active
Viewed 43 times
0
-
assemblies are loaded on-demand, so "wasn't used (yet)" => "won't be loaded" - is that sufficient? – Marc Gravell May 21 '20 at 09:21
-
First I would like to thank you @MarcGravell, actually I won't all assemblies that will be used either in compile time or run time(until the execution of the program is ended) wish you understood what I mean. – Tahatoun May 21 '20 at 11:40
-
you want to know the entire transitive dependency tree? maybe look here? https://www.jerriepelser.com/blog/analyze-dotnet-project-dependencies-part-2/ – Marc Gravell May 21 '20 at 12:14
-
Well I already parsed the project.assets.json file using LockFile class, but even though you just have the dependency graph but it can't tell you what are assemblies to be loaded, for example if you use a package witch depend on Newtonsoft.Json and didn't use Newtonsoft.Json in your project, Newtonsoft.Json corresponding assembly won't be loaded. – Tahatoun May 21 '20 at 13:17