title: PowerShell runtime exception - "could not load file or assembly"
body: <p>This seems to be a common problem in PowerShell and Visual Studio, yet cases and solutions seem to vary a lot. Though seeing several similar questions, I didn't find a working solution for my issue yet.</p>
  
  <p>The problem exists in the error message</p>
  
  <blockquote>
    <p>Could not load file or assembly
    'file:///C:\users\jenstmar\Desktop\WinSCP.dll' o r one of its
    dependencies. Operation is not supported. (Exception from HRESULT:
    0x80131515)</p>
  </blockquote>
  
  <p>The file location is invalid, as the .dll is supposed to be located in the same folder as the <a href="https://en.wikipedia.org/wiki/WinSCP" rel="noreferrer">WinSCP</a> installation. This location was changed to check that no rights or lack thereof, restricted me to use it.</p>
  
  <p>The script line that causes the problem looks as following:</p>
  
  <pre><code># Load WinSCP .NET assembly
  [Reflection.Assembly]::LoadFrom("C:\users\jenstmar\Desktop\WinSCP.dll") | Out-Null
  </code></pre>
  
  <p>This error comes in both <a href="https://technet.microsoft.com/en-us/library/dd315244.aspx" rel="noreferrer">PowerShell ISE</a> and PS ISE(x86). I run PowerShell V3.0 in a Windows Enterprise 64 bit environment as local administrator. How can I fix this problem?</p>