Skip to content

Instantly share code, notes, and snippets.

@19WAS85
Last active September 29, 2022 22:22
Show Gist options
  • Save 19WAS85/5401024 to your computer and use it in GitHub Desktop.
Save 19WAS85/5401024 to your computer and use it in GitHub Desktop.
Loads all assemblies (dlls) in 'packages' directory. Useful to work with nuget.
function Load-Packages
{
param ([string] $directory = 'Packages')
$assemblies = Get-ChildItem $directory -Recurse -Filter '*.dll' | Select -Expand FullName
foreach ($assembly in $assemblies) { [System.Reflection.Assembly]::LoadFrom($assembly) }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment