C# list all the invovled assmblies via AssemblyLoadContext

 static void AssemblyLoadContextDemo()
        {
            var assms = AssemblyLoadContext.All.SelectMany(x => x.Assemblies);
            if(assms!=null && assms.Any())
            {
                foreach(var asm in assms)
                {
                    Console.WriteLine(asm.Location);
                    System.Diagnostics.Debug.WriteLine(asm.Location);
                }
            }
        }

 

posted @ 2020-06-22 15:52  FredGrit  阅读(185)  评论(0编辑  收藏  举报