472,145 Members | 1,389 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,145 software developers and data experts.

how to load assembly dinamically

I want to load an assembly dinamically into another application with a
button click.

how to load and execute that dinamic assebly..

i tried like this
copied that target assebly in bin folder and like........
AppDomain newdomain = AppDomain.CreateDomain("RMS");

newdomain.ExecuteAssembly("dllsample.dll");

but it is creating new appdomain ,i dont want to create new domain and in
same appdomain i need to load..
thank u

thank u
Sep 25 '06 #1
2 1900
chandu escribió:
I want to load an assembly dinamically into another application with a
button click.

how to load and execute that dinamic assebly..

i tried like this
copied that target assebly in bin folder and like........
AppDomain newdomain = AppDomain.CreateDomain("RMS");

newdomain.ExecuteAssembly("dllsample.dll");

but it is creating new appdomain ,i dont want to create new domain and in
same appdomain i need to load..
Look at the static method LoadFrom() in the Assembly class.

Regards,

Andrés [ knocte ]

--
Sep 25 '06 #2
Not sure what your end goal for this is but it might be better to load your
assemblies to another app domain.
The app domain is in the same process space (although does require
marshalling for cross app domain boundary calls.
It is also the only way you would be able to unload the dll when your
finished with it as you cant remove an assembly from an app domain but you
could unload the whole app domain. Just incase you wanted to unload it to
conserve resources.

HTH

Ciaran O'Donnell

"chandu" wrote:
I want to load an assembly dinamically into another application with a
button click.

how to load and execute that dinamic assebly..

i tried like this
copied that target assebly in bin folder and like........
AppDomain newdomain = AppDomain.CreateDomain("RMS");

newdomain.ExecuteAssembly("dllsample.dll");

but it is creating new appdomain ,i dont want to create new domain and in
same appdomain i need to load..
thank u

thank u
Sep 25 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by John Alesse | last post: by
6 posts views Thread by Steve | last post: by
reply views Thread by Chepre | last post: by
3 posts views Thread by Kojikabutosv | last post: by
2 posts views Thread by David Thielen | last post: by
reply views Thread by Saiars | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.