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);
                }
            }
        }

 

你可能感兴趣的:(C# list all the invovled assmblies via AssemblyLoadContext)