.NET

Reply
Active Contributor
jithin.dcs
Posts: 31
Registered: ‎09-11-2009
Message 1 of 6 (511 Views)

Netload not loading the dll

511 Views, 5 Replies
11-25-2011 01:46 AM

hi,

 

i have a set of C# .net dlls (.net 3.5) which i used to load automatically in Autocad 2010. Everything was working perfectly but suddenly one fine day one of the dll stopped loading. So i tried loading it using netload command but doesnt work. Its not showing any messages after netloading and when i type commands of that dll it says unknown command. I tried putting a message box in the initialize of the dll but that message also not showing up.

 

what could be the problem. please anyone can helpout.

 

thanks in advance

 

Jithin Shyam S

 

Distinguished Contributor
quigs
Posts: 143
Registered: ‎09-30-2008
Message 2 of 6 (507 Views)

Re: Netload not loading the dll

11-25-2011 02:29 AM in reply to: jithin.dcs

Hi,

with no code it's impossible to give you an answer, but if things suddenly stop

working for me the first thing I do is remove any try catch statements & see

if the error is being caught, if it is it will crash and you can see where.

Or have you added this line of code bellow your "IMPORTS"

 

<Assembly: CommandClass(GetType(“Class name here”))>

 

 

Cheers,

 

Martin.

My name is Martin.. :smileyvery-happy:
Active Contributor
jithin.dcs
Posts: 31
Registered: ‎09-11-2009
Message 3 of 6 (505 Views)

Re: Netload not loading the dll

11-25-2011 02:45 AM in reply to: quigs

thanks for ur reply martin,

 

actually i think the dll is not at all loading.. because i tried putting initialize method in the class and its not coming inside intialise.. so i think ther is no point in testing by removing try catch block. and can u be more specific on where should i place this code <Assembly: CommandClass(GetType(“Class name here”))>

 

thanks

 

*Expert Elite*
Alfred.NESWADBA
Posts: 9,250
Registered: ‎06-29-2007
Message 4 of 6 (498 Views)

Re: Netload not loading the dll

11-25-2011 03:46 AM in reply to: jithin.dcs

Hi,

 

this problem could arise if you have the mangaged-dll's copied in your bin-directory.

That works as long as the dll's are the same as AutoCAD has, but e.g. when installing a service pack to AutoCAD that changes the *mgd*.dll you may get this problem.

So look for such files (*mgd*.dll) in your bin-directory, if that are files from AutoCAD remove them (well, backup them before).

For you VisualStudio-project that means you should set the properties of these references to "Copy local" to NO.

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Distinguished Contributor
quigs
Posts: 143
Registered: ‎09-30-2008
Message 5 of 6 (492 Views)

Re: Netload not loading the dll

11-25-2011 04:18 AM in reply to: jithin.dcs

Imports Autodesk.AutoCAD.ApplicationServices

Imports Autodesk.AutoCAD.DatabaseServices

Imports Autodesk.AutoCAD.Runtime

 

<Assembly: CommandClass(GetType(Namehere))>

 

Public Class Namehere

    <CommandMethod("CommandName")> _

    Public Sub SunNamehere ()

 

 

 

 

    End Sub

End Class

My name is Martin.. :smileyvery-happy:
*Expert Elite*
dgorsman
Posts: 5,538
Registered: ‎10-12-2006
Message 6 of 6 (478 Views)

Re: Netload not loading the dll

11-25-2011 08:05 AM in reply to: jithin.dcs

Have you loaded any BETA release or newer release software on the computer before your last compile?  I had a similar problem with a routine which required use of COM, a BETA install had overwritten one of the interop DLLs in ...\Common Files\AutoDesk Shared\... resulting in a reference to an interop file version that nobody else had.  Whoopsie...

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
Adopt. Adapt. Overcome. Or be overcome.
A good question will be halfway to a good answer.


Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.