.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

netload does not want to load my dll

5 REPLIES 5
Reply
Message 1 of 6
Anonymous
1249 Views, 5 Replies

netload does not want to load my dll

Hi everyone i am new to C#. And i am trying to load my first .net "hello world" code. I am able to successfully create a .dll file (without any errors). But the problems come when i try to Netload the dll. When i Netload my dll it does not do anything. When i type command AutoCAD tells me that no such command is found. Please help.

 

Thank you,

 

-Jay

5 REPLIES 5
Message 2 of 6
michael.robertson
in reply to: Anonymous

Can you post the section of code where your command starts?

Mike Robertson
FL. Dept. of Transportation
CADD Applications Developer
Message 3 of 6
Anonymous
in reply to: Anonymous

Make sure you have Copy Local set to False for AcDbMgd.dll and AcMgd.dll which you referenced.

 

This is just the first of many annoying things you will have to remember.

Message 4 of 6
Anonymous
in reply to: Anonymous

Also, if you're running a newer version of visual studio, you will have to change the framework to 3.5

 

In project properties (for each project in your solution) you need to change "Target Framework" to .NET Framework 3.5

Message 5 of 6
Anonymous
in reply to: Anonymous

Just to be clear, the problem you have is not that NETLOAD does

not want to load your DLL.

 

There are quite a few possible reasons that can cause

AutoCAD to not recognize CommandMethods:

 

- CopyLocal on AutoCAD assemblies are not set to False.

 

- The CommandClass attribute is being used in the same 
   assembly, but is not used to identify the class that has
   CommandMethod(s) that are not recognized.

 

- The class exposing the CommandMethod does not have 
  'publc' visiblity.

 

- The method with the CommandMethod attribute on it does 
   not have 'public' visibility. If you are just starting out, the

   method should also be declared as 'static' (Shared in VB).
 

- Multiple CommandMethods with the same name.
 

- If your assembly includes a class that implements 
  IExtensionApplication, and an exception is being thrown
  by the code in (or called from) that interface's Initialize()
  method, no commands are defined.

 

There are other causes, but these are the most
common ones.

 

Message 6 of 6
Anonymous
in reply to: Anonymous

First, thank you everyone for your help. This was a very broad question. . . I apologies for that I should know better.

 

Additional thanks to you Mohnston, I was very near of destroying my machine.Your suggestion did the trick. Thanks

 

-J

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost