Accessing dll

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

I have a class dll which I would ideally like to reside in [Program
files]\[Common Files]\[My Class] folder. My question is; How are my vb.net
apps to reference and use this dll specially since the [Program
files]\[Common Files]\[My Class] folder can reside on different drives
between production and release machines.

Thanks

Regards
 
John said:
Hi

I have a class dll which I would ideally like to reside in [Program
files]\[Common Files]\[My Class] folder. My question is; How are my
vb.net apps to reference and use this dll specially since the
[Program
files]\[Common Files]\[My Class] folder can reside on different
drives between production and release machines.


http://msdn.microsoft.com/library/en-us/cpguide/html/cpconhowruntimelocatesassemblies.asp


BTW, the group microsoft.public.dotnet.framework.setup is probably for
questions about installing the framework, so I didn't reply to that group.

Armin
 
Ahhh..but putting the dlls in gac can have issues with versioning when
installed with msie? In which case I would prefer to keep the dlls
elsewhere.

Regards

Armin Zingler said:
John said:
Hi

I have a class dll which I would ideally like to reside in [Program
files]\[Common Files]\[My Class] folder. My question is; How are my
vb.net apps to reference and use this dll specially since the
[Program
files]\[Common Files]\[My Class] folder can reside on different
drives between production and release machines.


http://msdn.microsoft.com/library/en-us/cpguide/html/cpconhowruntimelocatesassemblies.asp


BTW, the group microsoft.public.dotnet.framework.setup is probably for
questions about installing the framework, so I didn't reply to that group.

Armin
 
John said:
Ahhh..but putting the dlls in gac can have issues with versioning
when installed with msie? In which case I would prefer to keep the
dlls elsewhere.

Is it the only possibility to put it into the GAC?


Armin
 
Armin Zingler said:
Is it the only possibility to put it into the GAC?

Could be misunderstood. Better: Is putting it into the GAC the only
possibility? I thought there are other ways mentioned, e.g. a config file. I
didn't read it but I think it's the right chapter.

Armin
 
John said:
Its probably more difficult to pick up dll if it is not in gac.

I think you answered your own question:
"In which case I would prefer to keep the dlls elsewhere."

Answer:
"but putting the dlls in gac can have issues with versioning when installed
with msie?"

So, if you can't install it in the GAC (I don't know if you can), install it
elsewhere.

I can't tell you more about it. Probably the people in the appropriate
framwork group can.

Armin
 
the installer should take of placement for you. as for directly
referencing in code (should there be a need), you can reference
relative to your current directory -- I use
Environment.CurrentDirectory for this during the loading of the main
form (there may be issues with using it later, but I have not tested
this). You can also use Reflection to get the Location or CodeBase for
the Assembly (it is my understanding that this can be a bit expensive
memory-wise, which is why I use the other approach. This approach
should be durable though)
 
Back
Top