Author Topic: Dll files are not loaded by Autocad 2011 Windows7 on 64bits  (Read 14791 times)

0 Members and 1 Guest are viewing this topic.

teslaxx

  • Guest
Dll files are not loaded by Autocad 2011 Windows7 on 64bits
« on: February 03, 2011, 06:43:23 AM »
Hello,

I have a net dll, which has been developed with visual studio 2008, language c#. When I tried it on a windows 7 64 bits it does absolutely nothing, it gives no errors, but does absolutely nothing when you type the commands. Commands are not recognized and it does not change the default system menu in autocad.

I set platform target: Any CPU and all the Autocad references have the setting: Copy Local set to false
« Last Edit: February 03, 2011, 06:49:39 AM by teslaxx »

n.yuan

  • Bull Frog
  • Posts: 348
Re: Dll files are not loaded by Autocad 2011 Windows7 on 64bits
« Reply #1 on: February 03, 2011, 10:53:06 AM »
So, you do see ""Unknown Command" prompt at command line when trying to execute a custom command defined in the loaded DLL, right?

One possible reason for this issue: does the loaded DLL contain a class that is an ExtensionApplication (e.g. it implements IExtensionApplication interface)? If yes, do you have code doing something in the implemented Initialize() method (I guess you do, if a class does implement IExtensionApplication)? Then, do you have try...catch{} block that wraps up all code in Initialize()?

If there is an exception occurs in Initialize() without being caught, AutoCAD simply silently jumps out Intialize() and then the loaded DLL becomes useless, thus the commands defined in it can not be recognised by AutoCAD.

teslaxx

  • Guest
Re: Dll files are not loaded by Autocad 2011 Windows7 on 64bits
« Reply #2 on: February 04, 2011, 02:48:05 AM »
Nope, is not working. Some behavior.

huiz

  • Swamp Rat
  • Posts: 913
  • Certified Prof C3D
Re: Dll files are not loaded by Autocad 2011 Windows7 on 64bits
« Reply #3 on: February 04, 2011, 06:04:15 AM »
It does work on 32 bit or XP/Vista?

Is your class public?
The conclusion is justified that the initialization of the development of critical subsystem optimizes the probability of success to the development of the technical behavior over a given period.

kaefer

  • Guest
Re: Dll files are not loaded by Autocad 2011 Windows7 on 64bits
« Reply #4 on: February 04, 2011, 06:15:05 AM »
Is your class public?

Other possible failure modes:

Is your method public?

Takes it void and returns it void? (Had that in F#: last statement didn't return unit, then the overall signature of the command method wasn't unit->unit)

As already mentioned, does your class implement IExtensionApllication, without exception handling?

teslaxx

  • Guest
Re: Dll files are not loaded by Autocad 2011 Windows7 on 64bits
« Reply #5 on: February 04, 2011, 07:31:42 AM »
Yes, all my classes are public and my dll are working on XP.

sinc

  • Guest
Re: Dll files are not loaded by Autocad 2011 Windows7 on 64bits
« Reply #6 on: February 04, 2011, 08:27:56 AM »
Do you have your build options set to "Any CPU"?

LE3

  • Guest
Re: Dll files are not loaded by Autocad 2011 Windows7 on 64bits
« Reply #7 on: February 04, 2011, 10:17:06 AM »
Other to check ...
If you use the arx/net wizard and end up adding something like:

[assembly: CommandClass(typeof(YourNamespace.Commands))]

Make sure to have this line added in all your classes, where you have command methods calls.

Or, simple remove all those calls.

... hth maybe

LE3

  • Guest
Re: Dll files are not loaded by Autocad 2011 Windows7 on 64bits
« Reply #8 on: February 04, 2011, 10:23:23 AM »
Another:

If you have some assemblies that are required to be side by side with your assembly app, check that.

I have to sometimes to rebuild or to make sure I am loading the latest build, when testing/debugging code on my 32 or 64 machines.

... hth maybe

Jeff H

  • Needs a day job
  • Posts: 6144
Re: Dll files are not loaded by Autocad 2011 Windows7 on 64bits
« Reply #9 on: February 04, 2011, 05:09:49 PM »
Another

Having a commands defined in two classes

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Dll files are not loaded by Autocad 2011 Windows7 on 64bits
« Reply #10 on: February 04, 2011, 05:11:47 PM »

Another  ..

spelling.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Dll files are not loaded by Autocad 2011 Windows7 on 64bits
« Reply #11 on: February 04, 2011, 05:14:31 PM »

Seeing the solution files may help someone resolve the issue.

Or creating a mini-solution that demonstrates your problem.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Jeff H

  • Needs a day job
  • Posts: 6144
Re: Dll files are not loaded by Autocad 2011 Windows7 on 64bits
« Reply #12 on: February 04, 2011, 05:15:18 PM »

Another  ..

spelling.

Thats why I use the Tab key

I can't spell  :oops:

teslaxx

  • Guest
Re: Dll files are not loaded by Autocad 2011 Windows7 on 64bits
« Reply #13 on: February 07, 2011, 05:10:32 AM »
For all the questions above: Yes and checked.  :-)

Once again. The "thing" is working on Windows XP, Windows 7(32Bits), but not on the Windows7(64bits)

P.S. And yes, I set to Any CPU and all the suggestions you... suggested.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Dll files are not loaded by Autocad 2011 Windows7 on 64bits
« Reply #14 on: February 07, 2011, 06:44:18 AM »
For all the questions above: Yes and checked.  :-)

Once again. The "thing" is working on Windows XP, Windows 7(32Bits), but not on the Windows7(64bits)

P.S. And yes, I set to Any CPU and all the suggestions you... suggested.

What am I, chopped liver ??


Seeing the solution files may help someone resolve the issue.

Or creating a mini-solution that demonstrates your problem.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.