"Could not load file or assembly"
In some cases, the NETLOAD command does not load the DLL and displays this error on the command line:
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.
To correct this error, try this procedure first..
If that does not work, quit AutoCAD and locate the file: C:\Program Files\Autodesk\AutoCAD\Acad.exe.config
Change your properties to read and write:
Open with Notepad and include this:
<runtime>
<loadFromRemoteSources
enabled="true"/>
</runtime>
It should stay that way:
<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>
Save, open AutoCAD and try NETLOAD again.