473,467 Members | 1,592 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Assembly dynamic loading

I am currently developing an application, which receives
Assembly objects from the network. I would like to load
these assemblies dynamically in the application.
I looked the informations about the Load and
LoadWithPartialName methods. If I have well understood,
these methods look first in the application directory for
the assembly and then in the GAC.

So I suppose in order to load my assemblies, I first have
to save them to disk (I want them in the application
directory and not in the GAC). I don't know how to do this
operation from an Assembly object.

Furthermore, does an Assembly object contain just the
information about the assembly or does it also contains
the compiled code?

Thanks a lot for helping.

Valéry Bezençon
Nov 15 '05 #1
1 4183
Valéry,

You will need to make sure that the assemblies are located in the
application directory. You can not save an assembly using the assembly
object. If you want to load them from a network share, then you can call
the static LoadFile method on the Assembly class to load the assembly from a
network share. However, you have to be careful, as this will cause the
assembly to run with a limited permission set (unless configured otherwise).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Valéry" <an*******@discussions.microsoft.com> wrote in message
news:0b****************************@phx.gbl...
I am currently developing an application, which receives
Assembly objects from the network. I would like to load
these assemblies dynamically in the application.
I looked the informations about the Load and
LoadWithPartialName methods. If I have well understood,
these methods look first in the application directory for
the assembly and then in the GAC.

So I suppose in order to load my assemblies, I first have
to save them to disk (I want them in the application
directory and not in the GAC). I don't know how to do this
operation from an Assembly object.

Furthermore, does an Assembly object contain just the
information about the assembly or does it also contains
the compiled code?

Thanks a lot for helping.

Valéry Bezençon
Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Daniel Mori | last post by:
Im at a loss on where to proceed next. I wonder if anyone can help me. I have a managed C++ DLL is basically a thin wrapper around several unmanaged classes. This DLL builds fine. In my...
2
by: Razzie | last post by:
Hey all, I'm working on this project where I'm dynamically loading an assembly. Basically what I want is that I can just replace my old dll file with a new one without having to do anything...
2
by: Matt | last post by:
I'm hoping someone can steer me in the right direction to try to do the following: I am developing an application where we receive files from customers. Right now we receive a variety of...
4
by: Barry Kelly | last post by:
I'm designing an application framework which will, amongst other things, live in an assembly hosted in the ASP.NET worker process, servicing webservice requests. Here's the scenario: APPFX is...
4
by: BrianS | last post by:
What is the best strategy for dynamic loading private assemblies in asp.net? I understand, and have confirmed, that any dll placed in the app's /bin dir will get loaded on startup. This is not...
12
by: Ron M. Newman | last post by:
Hi, I can load an assembly using the Assembly.Load(....) However, I'd like dynamic loading of assemblies to be identical to putting an assembly reference in your VS2005 project. and yes, I...
4
by: =?Utf-8?B?SmFu?= | last post by:
I have a .NET 2.0 application divided in two assemblies; the exe and a dll. The application generates a plugin-dll which is then loaded in a separate AppDomain (along with a second instance of my...
3
by: Peter | last post by:
Hi I can create types from dynamic loaaded assemblies (Assembly.Load) with Assembly.GetTyp( <typename) - OK I need a reference to the assembly (just Type.GetType() do not work ) now my...
7
by: uncle | last post by:
config file that contains lines like... assemblyname|classname|methodname I want to invoke that static method. I found the following examples which make sense... Type theClass =...
2
by: Ashutosh | last post by:
Hi, I have this simple code AppDomain d = AppDomain.CreateDomain("test123"); Assembly a = d.Load("ClassLibrary1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c4510fb7f9c15154"); MethodInfo m...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.