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

上一篇:Win10远程电脑出现身份验证错误,要求函数不受支持的解决方法


下一篇:C# 使用匿名类型存储LINQ查询结果