473,407 Members | 2,629 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Problem resolving assemblies

Hello,

I am facing an issue I cannot easily solve. I am writing a non-managed C++
application that I want to be extensible using plugins. The goal is to let
people write plugins in any language they want including C# (but also C++,
Delphi or whatever...). The way I am doing things right now is to write a
managed C++ wrapper that implements the callbacks required by the
application to be recognized as a plugin and uses code written in C# and
provided as a DLL. I therefore have two DLL's for one plugin: the C++
wrapper and the C# real stuff.

This works fine except for one issue: it would be nice to place in a
"plugins" directory next to the application binary. Ideally I should
therefore have the following layout (final version also has each plugin in
its own subfolder of the plugins directory but let's keep it simple for the
moment):
-- app.exe (unmanaged C++)
-- plugins
----- wrapper.dll (managed C++)
----- plugin.dll (C#)

The problem is that wrapper.dll does not resolve the plugin.dll assembly
unless I put it next to app.exe which is not very nice. I tried to solve the
issue by using AppDomain::CurrentDomain->AppendPrivatePath("plugins"); in
wrapper.dll but this does not work neither. Please note that my AppDomain's
BaseDirectory is the folder of app.exe and not the plugins folder so it
seems like I get the AppDomain of the application and not the one of the DLL
although app.exe is not managed... I tried a lot of things but cannot reach
anything working.

Again, there is no problem mixing all these languages (C# code wrapped by
managed C++ code for a unmanaged C++ application) as if I put plugin.dll
besides app.exe everything works fine.

Thanks for any help!

Regards,
mynab

Nov 22 '05 #1
1 1399
I haven't tried it with CurrentDomain, but I've successfully done what
you wanted in a new AppDomain by changing AppDomainSetup's
PrivateBinPath property to the plugins directory.

Regards
Senthil

Nov 22 '05 #2

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

Similar topics

6
by: Iain Bishop | last post by:
I'm trying to model objects for the following problem: A building site contains assemblies, each of which can contain other assemblies and/or materials. I have modelled this using a Site...
2
by: Wol | last post by:
I have two assemblies, A.dll and B.dll. A.dll contains two methods. One method, UsesB, uses a type from B.dll whereas the other, DoesNotUseB, does not. To cache a native image of A.dll with...
1
by: mynab | last post by:
Hello, I am facing an issue I cannot easily solve. I am writing a non-managed C++ application that I want to be extensible using plugins. The goal is to let people write plugins in any language...
15
by: Ken Allen | last post by:
I have been developing a suite of assemblies over the past couple of weeks, and this afternoon somethign started misbehaving. If I do not run the IDE and compiler the code from the command line,...
1
by: JPRoot | last post by:
Hi I have a problem with the development environment I have a DLL (jproot.dll) versionned 1.9.0.33 that I have shipped to my customer My customer made a DLL (cust.dll, versionned 1.2.3.4)...
0
by: JonS. | last post by:
Hey All, I'm currently working on a program that dynamically loads assemblies from a directory each into their own seperate AppDomains using a somewhat logical extension of Eric Gunnerson's...
4
by: anders | last post by:
I already asked this question in the VB.NET group but as C# seems to have the same problem, I'll try here, too. I have 2 external OEM assemblies A1 and A2 that both define class X (same name,...
0
by: Wanderer | last post by:
Hi all, who knows how to correctly make assembly resolving in asp.net? In WinApplications AppDomain.CurrentDomain.AssemblyResolve event works fine, but this is not a case of asp.net. If I...
5
by: srinivas | last post by:
Hi, I have a ASP.net application which takes excel sheet as input.It retrieves the data from the excel sheet and using that data it generates reports. On my PC everything is working fine.But if...
6
by: joseph2000 | last post by:
Hi, I'd like to ask you for some ideas how to solve problem I currently have. The problem is as follows: we have a component which is integrated with w Windows Explorer. From time to time we...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...
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,...
0
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...
0
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...

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.