• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    .NET

    Reply
    Contributor
    ChrisBatt
    Posts: 12
    Registered: ‎11-21-2011

    netload does not load dll

    266 Views, 15 Replies
    12-26-2012 01:48 PM

    I'm having trouble with my command not loading via a netload in AutoCAD 2012 SP1 64bit running on Windows 7 64bit.  It works on most of my user's computers, but on a couple of the computers it doesn't seem to be doing anything.  I'm using Visual Studio 2010 for coding and debugging, but I don't have debugging software on the computer that is causing the problem.  I've attached my commands class in it's entirety to this post in the hopes that someone can point me in the right direction.  The dll resides local on the user's computer and is not in a network location.  When I run the netload on the development machine or one of my other working users, I get the message boxes and the program seems to run fine, but on the computers that aren't working I get nothing.  No errors, no message boxes, nothing.  Any questions or solutions would be greatly appreciated as I've been trying all sorts of things to see what I can do to resolve the problem.  Thanks in advance.

    Please use plain text.
    *Expert Elite*
    Posts: 6,417
    Registered: ‎06-29-2007

    Re: netload does not load dll

    12-26-2012 01:57 PM in reply to: ChrisBatt

    Hi,

     

    At least when starting command _NETLOAD and pointing to your dll you get some infos at command-line,

     

    - alfred -

    -------------------------------------------------------------------------
    Alfred NESWADBA
    Ingenieur Studio HOLLAUS ... www.hollaus.at
    -------------------------------------------------------------------------
    Please use plain text.
    Contributor
    ChrisBatt
    Posts: 12
    Registered: ‎11-21-2011

    Re: netload does not load dll

    12-26-2012 01:58 PM in reply to: alfred.neswadba

    Actually there is no error in the command line.  That is what is really frustrating.

    Please use plain text.
    *Expert Elite*
    Posts: 6,417
    Registered: ‎06-29-2007

    Re: netload does not load dll

    12-26-2012 02:01 PM in reply to: ChrisBatt

    Hi,

     

    >> Actually there is no error in the command line.

    I can't beleive that (even tried <F2> to see more lines?), but ok.

    Have you tried any of the sample-projects shipped with the ObjectARX-kit? Do they also not load/run?

     

    - alfred -

    -------------------------------------------------------------------------
    Alfred NESWADBA
    Ingenieur Studio HOLLAUS ... www.hollaus.at
    -------------------------------------------------------------------------
    Please use plain text.
    *Expert Elite*
    Posts: 6,417
    Registered: ‎06-29-2007

    Re: netload does not load dll

    12-26-2012 02:10 PM in reply to: ChrisBatt

    Hi,

     

    an additional idea: remove the INITIALIZE part, if there are exceptions in it the loading of the DLL may fail.

    You can try to run your initialize at the first command-start of one of your commands (at least for a test period)

     

    - alfred -

    -------------------------------------------------------------------------
    Alfred NESWADBA
    Ingenieur Studio HOLLAUS ... www.hollaus.at
    -------------------------------------------------------------------------
    Please use plain text.
    Contributor
    ChrisBatt
    Posts: 12
    Registered: ‎11-21-2011

    Re: netload does not load dll

    12-26-2012 02:13 PM in reply to: alfred.neswadba

    Hope this makes sense.  Here is my entire command prompt from when I try the netload:

     

    Customization file loaded successfully. Customization Group: ACAD

    Customization file loaded successfully. Customization Group: AUTOCADWS

    Customization file loaded successfully. Customization Group: AUTODESKSEEK

    Customization file loaded successfully. Customization Group: CONTENTEXPLORER

    Customization file loaded successfully. Customization Group: EXPRESS

    Regenerating model.

    Command: _RIBBON

    Command: COMMANDLINE

    Command: acenav

    Command:

    Command:

    Command: NETLOAD

    Command: PID

    Unknown command "PID".  Press F1 for help.

    Please use plain text.
    *Expert Elite*
    Posts: 6,417
    Registered: ‎06-29-2007

    Re: netload does not load dll

    12-26-2012 02:18 PM in reply to: ChrisBatt

    Hi,

     

    "unknown command" does not necessarily mean "DLL not loaded". This also happens when you used the wrong framework for creating your DLL or any defects in the framework-installations.

    Try my two tips above, remove the INITIALIZE sequence in your project for test and try to load another DLL from any other project.

     

    HTH, - alfred -

    -------------------------------------------------------------------------
    Alfred NESWADBA
    Ingenieur Studio HOLLAUS ... www.hollaus.at
    -------------------------------------------------------------------------
    Please use plain text.
    Contributor
    ChrisBatt
    Posts: 12
    Registered: ‎11-21-2011

    Re: netload does not load dll

    12-26-2012 02:27 PM in reply to: alfred.neswadba

    Alright, I tried loading a different dll and this one worked correctly.  I also removed the initialize code completely and removed the IExtensionApplication inheritance my commands class.  The problem still exists on my one computer, but loads correctly on my other computer. 

    Please use plain text.
    *Expert Elite*
    Posts: 6,417
    Registered: ‎06-29-2007

    Re: netload does not load dll

    12-26-2012 02:34 PM in reply to: ChrisBatt

    Hi,

     

    >> I tried loading a different dll [...] I also removed the initialize code

    Wow, you are fast! :smileywink:

     

    >> The problem still exists on my one computer, but loads correctly on my other computer.

    What are the differences between those workstations (os, os servicepack, AutoCAD + SP, installed Frameworks, ...)

    If on the "defect system" other DLLs work well I would start to do two things:

    • look that "local copy" for the references from AutoCAD (acmgd and acdbmgd) is set to false ...because if you copy them to the destination directory of your DLL ... and these DLLs are from another AutoCAD servicepack then your AutoCAD you also may get the problem with unknown command.
    • try to repair Framework-installations
    • copy/paste your code from the none-functional project into the test-project

     

    Good luck,  - alfred -

    -------------------------------------------------------------------------
    Alfred NESWADBA
    Ingenieur Studio HOLLAUS ... www.hollaus.at
    -------------------------------------------------------------------------
    Please use plain text.
    Valued Mentor
    Posts: 300
    Registered: ‎05-06-2012

    Re: netload does not load dll

    12-27-2012 01:58 AM in reply to: ChrisBatt

    Open the Registry editor, and go to the registry key where your application is creating the demand-load entries, and delete the entire key so that there is no demand-loading of your app to confuse things.

     

    My guess is that AutoCAD is loading another copy of your assembly at startup, or when your command is issued.

     

    If you're developing and use demand-loading you need to be sure that the location of the assembly in the registry is the same as the location of the assembly you're building and testing.

    Please use plain text.