How to load an assembly as reflection-only in a new AppDomain?
问题 I'm experienced in C# but relatively unfamiliar with the concepts of AppDomain and the like. Anyway, I'm trying to get an assembly to load in a reflection-only context so I can grab all of its namespaces. Here is the code I have right now (warning: PowerShell): function Get-Namespaces($assembly) { $assemblyClass = [Reflection.Assembly] $winmdClass = [Runtime.InteropServices.WindowsRuntime.WindowsRuntimeMetadata] $domain = [AppDomain]::CurrentDomain # Since desktop .NET can't work with winmd