Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > PowerShell

possible to set assembly probing path in powershell?

Closed Thread
 
Thread Tools Display Modes
Old 12-28-2007   #1 (permalink)
Steve
Guest


 

possible to set assembly probing path in powershell?

I need to load a few assemblies into powershell and exercise via scripting.
I've been having problems getting it to work right (a lot of FileExceptions,
cant load assembly). I recently read a blog about needing to set probing path
for Powershell.

It'd be great to be able to set assembly probing path inside of Powershell
via script? Is this possible?




Old 12-29-2007   #2 (permalink)
Hal Rottenberg
Guest


 

Re: possible to set assembly probing path in powershell?

Steve wrote:
Quote:

> I need to load a few assemblies into powershell and exercise via scripting.
> I've been having problems getting it to work right (a lot of FileExceptions,
> cant load assembly). I recently read a blog about needing to set probing path
> for Powershell.
I don't know anything about probe paths, but how are you trying to load
these? Are you using loadfrom?

This is a good method for loading multiple assemblies:

Get-ChildItem $profiledir\Assemblies\*.dll | % {
[void][reflection.assembly]::LoadFrom( $_.FullName )
write-host "Loading .NET assembly:`t$($_.name)"
}

--
Hal Rottenberg <hal@xxxxxx>
Author, TechProsaic (http://halr9000.com)
Webmaster, Psi (http://psi-im.org)
Co-host, PowerScripting Podcast (http://powerscripting.net)
Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing the PATH variable in the registry with Powershell meissnersd PowerShell 4 04-25-2008 02:40 PM
Powershell passing $null to .Net assembly is cast to String.Empty Mel PowerShell 5 02-12-2008 05:42 AM
Load path behaves differently in Vista Powershell? Sue & Bill PowerShell 1 01-13-2008 07:19 PM
Loading assembly dependencies with Powershell J.Marsch PowerShell 0 02-08-2007 05:47 PM
BUG? (Test-Path $path -IsValid) and empty $path =?Utf-8?B?Um9tYW4gS3V6bWlu?= PowerShell 1 08-28-2006 12:10 PM








Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50