Author Topic: MYNETLOAD - Extension Loader Diagnostic Tool  (Read 14006 times)

0 Members and 1 Guest are viewing this topic.

Matus

  • Guest
Re: MYNETLOAD - Extension Loader Diagnostic Tool
« Reply #15 on: September 02, 2013, 04:46:05 AM »
I have the same problem as Will, is there any chance, that this tool will be usable in 2013?

Jeff H

  • Needs a day job
  • Posts: 6144
Re: MYNETLOAD - Extension Loader Diagnostic Tool
« Reply #16 on: September 04, 2013, 02:46:18 AM »
I downloaded it but guess never used it or not on 2013 at least.
I  created a project with using required assemblies for 2013  and made one change noted below and project attached.

If interested a couple of notes of what needed changing.
There is a  Application class in accoremgd and Acmgd assembly
In accoremgd assembly is located in namespace Autodesk.AutoCAD.ApplicationServices.Core, and
for acmgd in namespace Autodesk.AutoCAD.ApplicationServices

The Application class in accoremgd assembly is abstract and the and the one in acmgd assembly inherits the application class in accoremgd.

In 2013 the ExtensionLoader class is still located in same namespace Autodesk.AutoCAD.ApplicationServices  but in a different assembly accoremgd.
 
So to quickly fix it make sure your using the Application type defined in accoremgd or pick another type.
Just used Document but could use any other type defined in accoremgd assembly.
Code - C#: [Select]
  1.     // Get the ExtensionLoader's AssemblyLoaded delegate:
  2.         static AssemblyLoadEventHandler GetAssemblyLoadHandler()
  3.         {
  4.             ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  5.                                                                 //CHANGE//
  6.             //Type type = typeof(Application).Assembly.GetType("Autodesk.AutoCAD.ApplicationServices.ExtensionLoader");/////
  7.                                                                  //TO//
  8.             //Type type = typeof(Autodesk.AutoCAD.ApplicationServices.Core.Application).Assembly.GetType("Autodesk.AutoCAD.ApplicationServices.ExtensionLoader");
  9.                                                                  //OR//
  10.             Type type = typeof(Document).Assembly.GetType("Autodesk.AutoCAD.ApplicationServices.ExtensionLoader");
  11.             if (type == null)
  12.                 throw new InvalidOperationException("ExtensionLoader not found");
  13.             MethodInfo method = type.GetMethod("OnAssemblyLoad", BindingFlags.Static | BindingFlags.Public);
  14.             if (method == null)
  15.                 throw new InvalidOperationException("OnAssemblyLoad() method not found");
  16.             return (AssemblyLoadEventHandler)Delegate.CreateDelegate(typeof(AssemblyLoadEventHandler), method);
  17.         }
  18.  
  19.  

gwhitch`

  • Mosquito
  • Posts: 2
Re: MYNETLOAD - Extension Loader Diagnostic Tool
« Reply #17 on: August 09, 2016, 02:55:12 PM »
Does this tool exist? I cant find it anywhere. I am having a problem with the commands not showing up although I know the dll is being loaded

gwhitch`

  • Mosquito
  • Posts: 2
Re: MYNETLOAD - Extension Loader Diagnostic Tool
« Reply #18 on: August 09, 2016, 02:57:15 PM »
Oops. Nevermind, I found it.

alexb

  • Mosquito
  • Posts: 2
Re: MYNETLOAD - Extension Loader Diagnostic Tool
« Reply #19 on: June 11, 2023, 04:16:10 AM »
Hi,
I am aware that this is a very old topic but....
I am trying to NETLOAD some old assemblies in an old Acad 2012 x64, on Win 7.
On one of them I get the error "Failed to complete setup of assembly (hr = 0x8013101b). Probing terminated."
I downloaded the Extension Loader Diagnostic Tool to help identify the problem but, to my dismay, I get the same error on loading the tool.
I want to emphasize that many other assemblies load and work correctly, so it's probably not a problem of Acad installation or .NET frameworks etc. I think.
I shall be thankful for any help.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8662
  • AKA Daniel
Re: MYNETLOAD - Extension Loader Diagnostic Tool
« Reply #20 on: June 11, 2023, 04:32:32 AM »
According to google, it's a runtime mismatch

you can try to edit acad.exe.config

Quote
<startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0"/>
 </startup>

or recompile the module for whatever framework 2012 supported

edit, and make sure you have the target framework installed on your computer

alexb

  • Mosquito
  • Posts: 2
Re: MYNETLOAD - Extension Loader Diagnostic Tool
« Reply #21 on: June 11, 2023, 10:29:40 AM »
Thank you El Jefe.
I edited acad.exe.config to runtime 4.0. It was set (intentionally) to runtime 2.0, and never had any problems with that, there were plenty of modules loading and running ok.
Anyway, now the tool loads and works and it finds no faults when loading my assembly.
But:
Under the debugger, my assembly loads with no error messages but the command is not registered.
Starting without debugging: ditto.
Manually opening Acad and loading the assembly: it loads ok, the command is registered and the forms is shown but of course, cannot debug it.
Any ideas?

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8662
  • AKA Daniel
Re: MYNETLOAD - Extension Loader Diagnostic Tool
« Reply #22 on: June 11, 2023, 06:02:36 PM »
Debugging was an issue for some versions, AutoCAD was using fibers, .NET’s debuggers couldn’t see them
you can play with NEXTFIBERWORLD/FIBERWORLD and toggling useLegacyV2RuntimeActivationPolicy