title: Could not load file or assembly(dll file path+name) or one of its dependencies. An attempt was made to load a program with an incorrect format
body: <p>When trying to perform-</p>
  
  <pre><code>Import-Module 'C:\\Program Files\\Nimble Storage\\bin\\Nimble.Powershell.dll'
  </code></pre>
  
  <p>through program, I am receiving below error:</p>
  
  <blockquote>
    <p>Could not load file or assembly 'file:///C:\Program Files\Nimble
    Storage\bin\Nimble.Powershell.dll' or one of its dependencies. An
    attempt was made to load a program with an incorrect format.</p>
  </blockquote>
  
  <p>The same works when ran directly from Powershell but in the above case, facing issue. </p>
  
  <p>C# program used and have used statement: </p>
  
  <pre><code>Collection&lt; PSObject &gt; resultCollection = runspaceInvoke.Invoke("Import-Module 'C:\\Program Files\\Nimble Storage\\bin\\Nimble.Powershell.dll'", null, out errors);
  </code></pre>