11/29/09

PowerShell Load Assembly Function

LoadAssembly loads an assembly into the PowerShell session.

Note that unloading an assembly from PowerShell requires closing the PowerShell window, so close the window before trying to rebuild or delete a loaded assembly.
function loadAssembly($file)
{
  [system.reflection.assembly]::loadfile($file) | out-null
}

Example
loadAssembly c:\lib\file.dll

1 comment:

  1. load assembly fullname/strong name using powershell background job "getAssemblyFullname"
    http://blog.expressionsoftware.com/2010/11/notes.html

    ReplyDelete