title: Could not load file or assembly HRESULT: 0x80131515 (When adding controller to MVC project that has assembly references on network drive)
body: <p>I've seen this: <a href="https://stackoverflow.com/questions/3007190/vsts-2010-sgen-error-could-not-load-file-or-assembly-exception-from-hresult">VSTS 2010 SGEN : error : Could not load file or assembly (Exception from HRESULT: 0x80131515)</a> and none of the answers work. It also doesn't appear when I build or anything. I can run the project fine, it happens when I try to add an entity framework templated controller:</p>
  
  <p><img src="https://i.stack.imgur.com/dxupo.png" alt="controller settings"></p>
  
  <p>Then I get this error:</p>
  
  <p><img src="https://i.stack.imgur.com/BA27O.png" alt="error message"></p>
  
  <p>All project files are on my network share because that is where My Documents resides for our work. Here is what I tried:</p>
  
  <p>1) Turning Generator Serialization Assembly in project settings to on, off, and auto.</p>
  
  <p>2) Adding sgen.exe.config to C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools with the following code:</p>
  
  <pre><code>&lt;configuration&gt;
   &lt;runtime&gt;
     &lt;loadFromRemoteSources enabled="true" /&gt;
   &lt;/runtime&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>3) Tried to unblock the assemblies, but I had no unblock option in the properties tab.
  <img src="https://i.stack.imgur.com/fSyyR.png" alt="no unblock option"></p>
  
  <p><strong>None of these solutions work</strong>. Does anyone have any idea how I can fix this???
  This error occurs for any custom assembly from nuget or my own projects due to their location existing on the network space, but only when trying to add an EF templated controller. I can build and run the program fine.</p>