title: How to reliably reference external .NET assemblies in a PowerShell v3 module?
body: <p>I am working on a PowerShell v3 module that needs to work with Types which are contained in a few external .NET assemblies.</p>
  
  <p>I would like this module to be reasonably self-contained for ease of deployment and I do not want to rely on these assemblies being loaded in the GAC.  Ideally, I would like to place the required assembly dll's in the module folder and then rely on PowerShell to automagically load these assemblies when the module is loaded.  </p>
  
  <p>I know that I could use the Add-Type command to brute force load the assemblies like so:</p>
  
  <pre><code>Add-Type -AssemblyName "Some.Assembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=sometoken"
  </code></pre>
  
  <p>But I have alse read about the required assemblies property in a module manifest and I am hopeful that this approach could eliminate the seemingly fragile Add-Type code:</p>
  
  <pre><code># Assemblies that must be loaded prior to importing this module
  # RequiredAssemblies = @()
  </code></pre>
  
  <p>What is the most reliable way to reference the external assemblies within the module?  Would declaring the dependency in the manifest implicitly load the assemblies when the module is loaded?  If I took advantage of the module manifest to list the required assemblies would I still have to write code that loads the assemblies?</p>
  
  <p>I'm really not looking for a simple "get it to work" solution as I already got this to work using the Add-Type approach... I am looking for guidance and reccomendations for the most reliable way of doing this.</p>