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

.net helper dll's of same name, which one used?

21 REPLIES 21
SOLVED
Reply
Message 1 of 22
JamesMaeding
3140 Views, 21 Replies

.net helper dll's of same name, which one used?

I was always under the impression you could make two .net programs for acad, say called prog1 and prog2, and place supporting dll's in each of the folders.

So Prog1's folder would have "helpers.dll", as well as Prog2's folder.

Like:

  Prog1

    Helpers.dll

  Prog2

    Helpers.dll

 

Now, each prog should look to its helpers.dll, as these are not going into the GAC.

 

What I am seeing though, is my Prog2 is using the Prog1's helper.dll during debug in acad.

Note that Prog1 gets neloaded on startup, so its loaded first.

 

I had not noticed this before as I kept helpers.dll in synch. I then allowed Prog2's to get ahead, by adding a method, and noticed I got a "method missing" error at runtime in acad.

Its like VS said everything was ok, but acad somehow said "no, use this helpers.dll for the .net prog already loaded".

 

I am not netloading the helpers.dll, it just sits there as support.

Any ideas how this crosstalk could happen?

 

The implication is I would not be able to have duplicate supporting dll's for various progs I do.

That is wrong though, .net does allow dupe named dll's so long as they sit right next to the calling dll.

thx

 

 

 


internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties

21 REPLIES 21
Message 21 of 22
jeff
in reply to: JamesMaeding

The ones in acad install folder are loaded up by autocad before any other .net app will be loaded up.

Those are the ones from ObjectArx SDK which are set copy local to false and are there just so you can have a sucessful build. Setting copy local to false kinda defeats the purpose but for other libraries like WPF extended toolset or some other aditional references it will be copied to build folder but your reference as far the project is concerned is realative to it.

 

Now that you menttion what is the problem of not setting copy local to false for acdbmgd.dll?

 

The code that loads your code is inside acdmgd.dll so it would already have to be loaded and should not matter if set to true.

 

 

You can also find your answers @ TheSwamp
Message 22 of 22
owenwengerd
in reply to: JamesMaeding

It will work fine in most cases, but it's really not ideal to reference the assemblies in the AutoCAD installation folder. Instead, use the DLLs from the managed SDK, as those contain only the minimum needed "stuff" and nothing else. They can be located wherever you want them.

--
Owen Wengerd
ManuSoft

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