473,605 Members | 2,734 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Plugin assembly path to find other needed assemblies

Actually it is:

How to define the plugin assemblies path in order to find other assemblies
which the plugin depends on.

Example:

If I have:

c:\myapp\applic ation.exe

then, other assemblies are also installed on the same subdirectory, example:

c:\myapp\assemb ly1.dll
c:\myapp\assemb ly2.dll
Then in subdirecory Plugins under main subdirectory I installed the plugins:

c:\myapp\Plugin s\plugin1.dll

But plugin1.dll also depends on

c:\myapp\assemb ly1.dll

as same as application.exe .

When runtime, there is an error when loading the assembly (with
Assembly.Load(x xx)) that dependant assemblies on plugin1.dll were not found
(c:\myapp\assem bly1.dll).

How to solve this without moving the plugins assemblies to the main
subdirectory ?

Thanks in advance
Luis Arvayo


Jan 13 '06 #1
2 2716
Luis Arvayo wrote:
Actually it is:

How to define the plugin assemblies path in order to find other
assemblies which the plugin depends on.

Example:

If I have:

c:\myapp\applic ation.exe

then, other assemblies are also installed on the same subdirectory,
example:

c:\myapp\assemb ly1.dll
c:\myapp\assemb ly2.dll
Then in subdirecory Plugins under main subdirectory I installed the
plugins:

c:\myapp\Plugin s\plugin1.dll

But plugin1.dll also depends on

c:\myapp\assemb ly1.dll

as same as application.exe .

When runtime, there is an error when loading the assembly (with
Assembly.Load(x xx)) that dependant assemblies on plugin1.dll were not
found (c:\myapp\assem bly1.dll).

How to solve this without moving the plugins assemblies to the main
subdirectory ?


In the application.exe .config file, add:
<runtime>
<assemblyBindin g xmlns="urn:sche mas-microsoft-com:asm.v1">
<probing privatePath="Pl ugins"/>
</assemblyBinding >
</runtime>

This will tell fusion to look in the subfolder Plugins for referenced
assemblies as well. Check the probing tag's documentation for more
details :)

Frans

--
------------------------------------------------------------------------
Get LLBLGen Pro, productive O/R mapping for .NET: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
Jan 13 '06 #2
Thanks for the answer, but...

Your suggestion works only for the main application which I already had
defined before posting. But it seems that it is ignored for the plugin,
because the error is raisee when issued the Assembly.Load(x xx)

Regards
Luis Arvayo
"Frans Bouma [C# MVP]" <pe************ ******@xs4all.n l> escribió en el
mensaje news:xn******** *******@news.mi crosoft.com...
Luis Arvayo wrote:
Actually it is:

How to define the plugin assemblies path in order to find other
assemblies which the plugin depends on.

Example:

If I have:

c:\myapp\applic ation.exe

then, other assemblies are also installed on the same subdirectory,
example:

c:\myapp\assemb ly1.dll
c:\myapp\assemb ly2.dll
Then in subdirecory Plugins under main subdirectory I installed the
plugins:

c:\myapp\Plugin s\plugin1.dll

But plugin1.dll also depends on

c:\myapp\assemb ly1.dll

as same as application.exe .

When runtime, there is an error when loading the assembly (with
Assembly.Load(x xx)) that dependant assemblies on plugin1.dll were not
found (c:\myapp\assem bly1.dll).

How to solve this without moving the plugins assemblies to the main
subdirectory ?


In the application.exe .config file, add:
<runtime>
<assemblyBindin g xmlns="urn:sche mas-microsoft-com:asm.v1">
<probing privatePath="Pl ugins"/>
</assemblyBinding >
</runtime>

This will tell fusion to look in the subfolder Plugins for referenced
assemblies as well. Check the probing tag's documentation for more
details :)

Frans

--
------------------------------------------------------------------------
Get LLBLGen Pro, productive O/R mapping for .NET: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------

Jan 13 '06 #3

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

Similar topics

2
20939
by: Rudolf | last post by:
Dear NG, I want to create a Plugin System in C# (WinForms). Has anybody experience about this, tips, tricks, or any links. Thank you very much The DotNetJunkie
2
3058
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 formats. I was looking at writing some type of base application that would allow me to add-in either new assemblies or plugins, don't know how or which way, for different scenarios. We may just recieve a text file so an assembly would handle...
0
1861
by: David Levine | last post by:
This is a lengthy post; please bear with me... This will be a large system with dozens of plugins. In addition to plugins developed internally there will be 3rd parties that will write their own and integrate them into our application. I will be managing the identification and loading of these plugins. In addition, there are a number of assemblies that plugins will reference, some shared, and others private. There are a couple of...
10
3433
by: jojobar | last post by:
Hello, I am trying to use vs.net 2005 to migrate a project originally in vs.net 2003. I started with creation of a "web site", and then created folders for each component of the site. I read somewhere that each folder under the "web site" is compiled in separate assembly. I however, did not find that the "web site" creation in vs.net 2005 created any AssemblyInfo.cs file.
3
4393
by: Richard Lewis Haggard | last post by:
We are having a lot of trouble with problems relating to failures relating to 'The located assembly's manifest definition with name 'xxx' does not match the assembly reference" but none of us here really understand how this could be an issue. The assemblies that the system is complaining about are ones that we build here and we're not changing version numbers on anything. The errors come and go with no apparent rhyme or reason. We do not...
3
2215
by: auad | last post by:
hi, I'm having a problem with plugins....as follows: I have 3 projects: 2 class libraries and 1 Windows App (Project 1: ClassLibrary) I have a plugin interface: -------------------------------------------------------------------- namespace API {
0
2009
by: Zeya | last post by:
Situation: Using C#, ASP.Net Requirement: 1. ASP.net application with virtual hosting service. 2. Requires a service that will run every predefined frequency in minutes (2, 30, 100, 10000) defined in web.config and do some data crunching in the database How am I doing this?
3
3344
by: Tim | last post by:
Hi, I've been struggling for a while trying to run plugins in C#, which have external references. The plugins load, and I can invoke methods through reflection until the method uses some code defined in an external assembly. The error returned is in all cases: "Could not load file or assembly 'MyAssName, Version=1.0.0.0,
7
10591
by: WTH | last post by:
I am now aware (I am primarily a C++ developer) that in C# if you reference the same interface from the same file in two different projects the types are actually incompatible. I found this out because I have written a generic plugin system for my current and future C# needs. I defined a base plugin system interface named IPlugin (original, I know...) which contains some basic plugin infomration all plugins of this system must expose...
0
8001
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
7934
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8424
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8415
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
8286
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
6742
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
3912
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
3958
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1537
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.