title: RegAsm error RA0000 Could not load file or assembly on Network Drive
body: <p>I experience a problem using a batch file to call Regasm on framework 4 on a network drive.
  It works correctly when the dll is on a local drive.</p>
  
  <p>The message is Could not load file or assembly filename.dll or one of its dependencies. Operation is not supported.</p>
  
  <p>The problem is discussed 
  <a href="http://darrendev.blogspot.com.au/2012/11/problems-with-net4-regasmexe-on-shared.html" rel="nofollow">here  ad "Darrens Developer Diary"</a></p>
  
  <p>however editing the config as described does not help</p>
  
  <p>I also tried the advice 
  <a href="http://iknown.blogspot.com.au/2011/06/regasm-error-ra0000-could-not-load-file.html" rel="nofollow">here</a>
  which differs in the line </p>
  
  <pre><code>&lt;loadFromRemoteSources="true"/&gt;   
  </code></pre>
  
  <p>with this I received a different error
  "The system cannot execute the specified program"</p>
  
  <p>The DLL used to use Framework 2, but I unregistered it using Framework 2 Regasm.</p>
  
  <p>Here is the regasm.exe.config</p>
  
  <pre><code>&lt;?xml version ="1.0"?&gt;
  &lt;configuration&gt;
  &lt;startup useLegacyV2RuntimeActivationPolicy="true"&gt;
      &lt;requiredRuntime safemode="true" imageVersion="v4.0.30319" version="v4.0.30319"/&gt;
      &lt;supportedRuntime version="v4.0" sku="client" /&gt;
  &lt;/startup&gt;
  &lt;runtime&gt; 
      &lt;loadfromremotesources enabled="true"&gt; &lt;/loadfromremotesources&gt;
  &lt;/runtime&gt; 
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Here is the command in my batch file </p>
  
  <pre><code>Z:
  cd foldername
  c:\WINDOWS\Microsoft.Net\Framework\v4.0.30319/regasm /verbose /codebase /tlb: .\SBD.CommBridge.tlb .\SBD.ComBridge.dll 
  </code></pre>