Urgent help on USe of AppendPrivatePath ??

G

Guest

Dear all

I am using the following code in my applciation

AppDomain.CurrentDomain.AppendPrivatePath("\Plugins"
objDomain = AppDomain.CurrentDomain.CreateInstanceFromAndUnwrap(Name + ".dll", "NomosNetSuite.PluginApp.PlugIn" & Name

Return (CType(objDomain, IPlugIn).Icon

If I place the library that I need to load at the same place of my executable folder I am able to load it and instanciate it without any problem

Then If I move the same file to the Plugins folder and add that folder to the reflexion by calling AppendAppPrivatePath, I am noit able to load it, I get an error that it cannot found the library

As you can see the path is relative, I could found any information on that to clear me up

Does oen of you can help me and give me a hint

THnaks for your hel
Regard
CALDERARA Serg
Maillefer S.A
 
M

Marc Scheuner [MVP ADSI]

AppDomain.CurrentDomain.AppendPrivatePath("\Plugins")

Don't use a backslash at the beginng - private paths are *always*
relative to your current path (your assembly's path):

AppDomain.CurrentDomain.AppendPrivatePath("Plugins")

Marc
================================================================
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)inova.ch
 
C

calderara serge

Hi,

I just try what you suggest as calling AppendPrivatePath("Plugins")

buut still no way, it cannot found the library

Any other hint?

regards
Serge
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top