limboz Posted March 17, 2015 Share Posted March 17, 2015 (edited) I have a .dll file compiled and written in VB express 2010 back in 2011 by my peer. Fast forward to 2015, Im trying to netload this .dll file with no success. is there anyway to migrate the codes and hopefully a tutorial for it. Cheers This is my error code. Cannot load assembly. Error details: System.IO.FileLoadException: Could not load file or assembly 'file:///C:\Users\z3424946\Desktop\BBprop.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) File name: 'file:///C:\Users\z3424946\Desktop\BBprop.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. at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark) at System.Reflection.Assembly.LoadFrom(String assemblyFile) at Autodesk.AutoCAD.Runtime.ExtensionLoader.Load(String fileName) at loadmgd() Edited March 17, 2015 by limboz Quote Link to comment Share on other sites More sharing options...
Stephan Nilsfelt Posted March 24, 2015 Share Posted March 24, 2015 Hi! I just had this error myself and found a solution through Kean Walmsleys post: Locate your acad.exe.config file, usually in C:\Program Files\Autodesk\AutoCAD 2015\acad.exe.config. Add: My file looks like this: Hope this will help you! /Stephan Quote Link to comment Share on other sites More sharing options...
BlackBox Posted March 24, 2015 Share Posted March 24, 2015 Firstly, and to both of you, welcome to CADTutor. Second, please be mindful to use [code ] Tags. To the issue, not knowing what is provided in the made-for-2011 assembly you're attempting to load, if enabling LoadFromRemoteSources is unsuccessful, it will likely be due to the fact that the API has been broken since 2011. Put simply, the advent of Core Console (AcCoreMgd.dll) now requires code be recompiled for newer versions, first in 2013, and then again in 2015 following API changes. If the latter is in fact the issue, then you're limited in what steps can be taken, without access to the source-code... Something which we can get into if needed, so long as the original author did not obfuscate the code at compile (unlikely for internal code, YMMV). Cheers Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.