By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,962 Members | 2,545 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,962 IT Pros & Developers. It's quick & easy.

how to load assembly dinamically

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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.