"Could not load file or assembly"



Em alguns casos, o comando NETLOAD não carrega a DLL e apresenta este erro na linha de comando:

Cannot load assembly. Error details: System. IO. FileLoadException: Could not load file or assembly 'file:///C:\TBN2CAD\TBN2CAD.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) File name: 'file:///C:\TBN2CAD\TBN2CAD.dll ' ---> System. NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the. NET Framework. This release of the. NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.

Para corrigir esse erro, antes tente este procedimento.

Se isso não funcionar, feche o AutoCAD e localize o arquivo: C:\Program Files\Autodesk\AutoCAD\Acad.exe.config

Mude suas propriedades para leitura e escrita:

Abra com o bloco de notas e inclua isso:


<runtime>         

    <loadFromRemoteSources enabled="true"/>

  </runtime



Deverá ficar assim:

<configuration>

  <startup useLegacyV2RuntimeActivationPolicy="true">

    <supportedRuntime version="v4.0"/>

  </startup>


  <runtime>         

    <loadFromRemoteSources enabled="true"/>

  </runtime


  <system. Diagnostics>

    <sources>

      <source name="System. Windows. Data" switchName="SourceSwitch">

        <listeners>

          <remove name="Default" />

        </listeners>

      </source>

    </sources>

  </system. Diagnostics>

</configuration>



Salve, abra o AutoCAD e tente o NETLOAD novamente.