473,654 Members | 3,251 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 2720
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
20942
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
3062
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
1865
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
3436
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
4395
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
2217
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
2010
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
8376
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
8290
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
8708
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...
1
8489
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6161
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5622
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
4149
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...
1
1916
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1596
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.