[void] [Reflection.Assembly]::LoadFile(.......)
--
Richard Siddaway
Please note that all scripts are supplied "as is" and with no warranty
Blog: http://richardsiddaway.spaces.live.com/
PowerShell User Group: http://www.get-psuguk.org.uk
"Steve" wrote:
> Hi,
>
> I need to set the probing path for powershell (so that it can find the DLLs
> i need to use).
>
> I created a powershell.exe.config and placed it in
> C:\WINDOWS\system32\windowspowershell\v1.0.
>
> I drop powershell and restart it.
>
> Using fusion, with enabledlog turned on, it says that "no configuration file
> loaded" for powershell, in resolving a "Load"
>
> Why cant i get powershell to use its config file?
>
> Many thanks.
Actually powershell.exe.config is most definitely loaded by
powershell, it's a .net application like anything else. You can prove
this quite simply by dropping a powershell.exe.config file into the
v1.0 directory:
<configuration>
<appSettings>
<add key="foo" value="bar" />
</appSettings>
</configuration>
Then, fire up posh and read it back:
==
Windows PowerShell
Copyright (C) 2006 Microsoft Corporation. All rights reserved.
PowerTab version 0.99 Beta 2 PowerShell TabExpansion library
/\/\o\/\/ 2007 http://thePowerShellGuy.com
PowerTab Tabexpansion additions enabled : True
PS C:\Users\Oisin>
[System.Configuration.ConfigurationSettings]::AppSettings["foo"]
bar
et voila. Your problems lie elsewhere ;-)
Can you give us more technical detail and what, why and how you're
trying to do what it is you need to do? I have a decent amount of
experience with the CLR loader.
- Oisin
Hi Steve,
Can you please post your powershell.exe.config configuration here,
along with current behaviour and expected behaviour in as much detail
as possibe?
Thanks,
- Oisin