URGENT : System areflexion assembly ???

S

Serge calderara

Hello,

I have try to use the AppenPrivate path to current domain
for assembly reflexion as follow :

AppDomain.CurrentDomain.AppendPrivatePath(
Global.ENVIRONMENT_PATH.PLUGINS_FILE_PATH)

obj = AppDomain.CurrentDomain.CreateInstanceFromAndUnwrap
(item.FileName,
"PluginApp.PlugIn" + item.Name)

Doing this it is able to load my assembly only if it is
present in my application folder. It does not search in
the folder that I specified in AppendPrivatePath.

What am i doing wrong ?

Thnaks for your reply
serge
 
K

Klaus H. Probst

Serge: Have you tried passing a *relative* path to AppendPrivatePath? That
is, pass @".\Plugins" instead of "C:\Blah\MyApp\Plugins"
 
C

calderara serge

Hello,

Thnaks for your reply..

If I display the Appdomain.CurrentDomain.BaseDirectory it display my
application executable path with "\" at the end

Then I have try to append relative path as
AppDomain.CurrentDomain.AppenPrivatePath("PLugins")

and also try AppDomain.CurrentDomain.AppenPrivatePath(".\PLugins")

But still it does not found assemblies...
Do you have any other ideas ?

thnaks for your help
 

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