473,795 Members | 2,911 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Reference an assembly in the config file?


Can some one please explain me the following:

"In your plugin config section, use the assembly name like "Class, Assembly,
Culture, Version, PublicKeyToken" so that you can just use
Type.GetType(na me) and instantiate it with GetConstructor( null).Invoke(nu ll)
or use the Type from Type.GetType() to do
type.Assembly.C reateInstance(t ype.FullName)."

This was published by Heath Stewart in a response to an article regarding
an application which load plugins

I want to use the same method lo dynamically load components to my
application
so if I am correctly understand I can add a"reference" to the assembly
inside the config file
and than create an object using Type.GetType() etc..?

Thanks.
Nov 16 '05 #1
1 2171
Hi Julia:

It seems this article outlines a common plugin approach. In the config
file you have the name of an assembly to load, and once you have the
name of the assembly you can use the System.Reflecti on.Assembly class
to bring it into your application.

Many plugin architectures also include a type name in the config file
to allow you to use Type.GetType, then System.Activato r can create an
instance of the type and you can start using the plugin.

You can find many examples and variations of this architecture with a
quick search:

http://www.google.com/search?hl=en&l...n+architecture

HTH,

--
Scott
http://www.OdeToCode.com
On Sun, 12 Sep 2004 11:02:23 +0200, "Julia" <co********@012 .net.il>
wrote:

Can some one please explain me the following:

"In your plugin config section, use the assembly name like "Class, Assembly,
Culture, Version, PublicKeyToken" so that you can just use
Type.GetType(n ame) and instantiate it with GetConstructor( null).Invoke(nu ll)
or use the Type from Type.GetType() to do
type.Assembly. CreateInstance( type.FullName). "

This was published by Heath Stewart in a response to an article regarding
an application which load plugins

I want to use the same method lo dynamically load components to my
application
so if I am correctly understand I can add a"reference" to the assembly
inside the config file
and than create an object using Type.GetType() etc..?

Thanks.


Nov 16 '05 #2

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

Similar topics

0
1742
by: Patrick | last post by:
This is a C# post. I'm using VB.NET to create an add-in for the Google Sidebar, and have implemented the OnDetailsView method. NOTE : I've come across this same problem (error message) even in C#. I tried placing a label control and setting the reference of this new lable into the 'details_control' parameter. This worked.
4
1875
by: dhnriverside | last post by:
HI guys I've just written my first independent namespace for my library (yay me!). However, on trying to add it to my website project, it causes an error when I look at the website. It compiles ok though... The error message is... "The located assembly's manifest definition with name 'HudsonNash.Utils.Security' does not match the assembly reference"
3
1862
by: byrd48 | last post by:
Hi, I have a web project that uses a dll file for email functions. When I'm working on the program in VS, something happens (for no reason apparent to me) that causes an access denied error as posted below. Is another process using the dll file? I have to reboot the computer before I can compile or run the application again. Thanks, Jon Parser Error Message: Access is denied: 'qqMail'.
5
2527
by: Robert | last post by:
I have a series of web applications (configured as separate applications) on a server. There is a main application at the root and then several virtual directories that are independant applications. I am testing an upgrade of all of the sites and have converted the main root site...although not necessarily fixed any issues. I move on instead and converted one of the virtual roots that is a seperate
9
4554
by: bill | last post by:
I keep getting Object reference not set to an instance of an object error when trying to run my application on an installed client machine. I installed it on several others and it runs fine. I tried installing .Net framework 1.1 on the clients machine that is getting the error but the error remains. Can anyone provide help? Thanks.
0
1993
by: =?Utf-8?B?SmFtZXM=?= | last post by:
I'm stuck with the following error... Does anyone know how to correct the reference? I've not idea why it is referencing 'Copy of...' Server Error in '/Client1' Application. -------------------------------------------------------------------------------- Configuration Error Description: An error occurred during the processing of a configuration file
0
1390
by: JB | last post by:
I have an ASP project written years ago that I have recently started to try and update. It was written by someone who used to work here before me, and the source code I have is in a major mess. There is just one (of many) DLL file that once I recompile I get the error mentioned above. The located assembly's manifest definition with name '.....' does not match the assembly reference (see snippet for full detail).
2
5146
by: Febria | last post by:
Dear, all... I have some problem with my application. I used UltraWebGrid component in my web application. Unfortunately, when I tried to run the web, the error page displayed: The located assembly's manifest definition with name 'Infragistics.WebUI.UltraWebGrid.v3' does not match the assembly reference. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for...
0
1391
balabaster
by: balabaster | last post by:
Hi all, I'm creating a class factory and a bunch of adapters to allow in house applications to communicate with mobile applications over different cellular networks. I've got my class factory and interface definition in a single assembly. The class factory will instantiate the correct adapter for communication with a mobile device at runtime. We're doing it this way because we won't know which cellular network we're communicating over...
0
9672
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10215
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10001
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6783
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5437
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3727
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2920
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.