Indirect load of type fails in PowerShell
Posted
by Dan
on Stack Overflow
See other posts from Stack Overflow
or by Dan
Published on 2010-06-03T06:14:16Z
Indexed on
2010/06/03
7:44 UTC
Read the original article
Hit count: 220
When invoking
[System.Configuration.ConfigurationManager]::GetSection("MySection")
from within a PowerShell prompt, it throws an exception because the assembly containing the type represented by "MySection" in the app config is unable to be loaded. However, I have previously loaded the assembly containing that type, and I am even able to instantiate the type directly using 'new-object'.
How is the ConfigurationManager resolving types such that the assemblies already loaded into the PowerShell app domain are not visible to it?
© Stack Overflow or respective owner