Cannot load assembly. Error details: System.IO.FileLoadException: Could not load file or assembly 'file:///C:\C3DRENESG\C3DRENESG4_2012_2000.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) File name: 'file:///C:\C3DRENESG\C3DRENESG4_2012_2000.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.
Este erro é bem comum e está relacionado a versão do .NET Framework instalado na sua máquina.
Para resolver este problema, você precisará:
- Localizar C:\Program Files\Autodesk\
__autocad__\Acad.exe.Config, onde __autocad__ é a pasta do autocad ou vertical. - Marcar este arquivo para poder ser editado (leitura e escrita), talvez você precise de permissão de administrador para isso.
- Adicionar estas linhas,
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>
Simples não?
Funcionou perfeitamente, obrigado!
ResponderExcluir