473,804 Members | 4,066 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Assemblies problem

Hi All,

I am creating an add-in for some third party tools A and B.
The add-in has a single GUI that is used in both A and B. The add-in
is build by referencing dlls from A and B.
The problem is, When I run this add-in on a client machine, both
softwares A and B have to be installed. Otherwise, the add-in gives an
ugly error saying it could not find the referenced dlls.
Is there a way programmaticall y to load these dlls when necessary and
work with them without adding them as reference during coding?

Regards,
Shilpa

Mar 12 '07 #1
2 1214
All a reference does is to tell your application where to find the types you
want to use. Logically, it seems unlikely that anything is going to get
loaded if the application doesn't know where it is.

As for the problem on deployment, how are you going to call the library
methods if the assemblies aren't present?

I'm finding it hard to understand your problem.

Hmm, actually, are you trying to say that at deployment time you only need
one or the other: not both? If so, your best bet, I think, would be to
write two tools, one for each library, in separate projects. That way you
only reference the code needed by the specific project. Depending on the
architecture of your application, you may be able to do something with
inheritance or interfaces to abstract out the common elements.
Peter

"Shilpa" <sh************ *@unisys.comwro te in message
news:11******** **************@ 30g2000cwc.goog legroups.com...
Hi All,

I am creating an add-in for some third party tools A and B.
The add-in has a single GUI that is used in both A and B. The add-in
is build by referencing dlls from A and B.
The problem is, When I run this add-in on a client machine, both
softwares A and B have to be installed. Otherwise, the add-in gives an
ugly error saying it could not find the referenced dlls.
Is there a way programmaticall y to load these dlls when necessary and
work with them without adding them as reference during coding?

Regards,
Shilpa

Mar 12 '07 #2

"Shilpa" <sh************ *@unisys.comwro te in message
news:11******** **************@ 30g2000cwc.goog legroups.com...
Hi All,

I am creating an add-in for some third party tools A and B.
The add-in has a single GUI that is used in both A and B. The add-in
is build by referencing dlls from A and B.
The problem is, When I run this add-in on a client machine, both
softwares A and B have to be installed. Otherwise, the add-in gives an
ugly error saying it could not find the referenced dlls.
Is there a way programmaticall y to load these dlls when necessary and
work with them without adding them as reference during coding?
Referenced DLLs are loaded lazily, i.e. when you first reference a class
contained in that DLL. Try organizing your top-level code to start with
something like:

bool aIsOK;
bool bIsOK;

try
{
// reference something in A;
...
aIsOK = true;
}
catch (Exception ex)
{
aIsOK = false;
}
try
{
// reference something in B;
...
bIsOK = true;
}
catch (Exception ex)
{
bIsOK = false;
}

and thereafter only call the application(s) which loaded successfully.
Mar 12 '07 #3

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

Similar topics

3
2997
by: lanky_tx | last post by:
Hi All, We have an automated build and test environment using NAnt and Nunit. Some of our assemblies are being strong named by modifying the AssemblyInfo.cs and having csc compile it. Some of these strong named assemblies are being dynamically loaded into the runtime. We store the metadata information about the strong named assemblies in a config file. Metadata in the config file looks like this:
9
4496
by: Ender | last post by:
I have an application that I would like third party developers to be able to create Plug-ins that will be dynamically loaded into our application to extend functionality. I have utilized the "Let Users Add Functionality to Your .NET Applications with Macros and Plug-Ins" article at MSDN for the dynamic loading of DLLs http://msdn.microsoft.com/msdnmag/issues/03/10/Plug-Ins/default.aspx
5
2956
by: Raterus | last post by:
I'm just throwing this error out for my sanity, I've seen posts about this, but never solutions. I'm using VS.NET 2003, Framework 1.1, and I'm getting a random error about every 1 out of 10 times I try to start to run/debug a project (through Visual Studio) Server Error in '/Intranet' Application. -------------------------------------------------------------------------------- Compilation Error Description: An error occurred during...
8
1548
by: Jason | last post by:
In my ASP.NET 1.1 solutions, I created several web projects and compiled them each into an assembly. The assembly names reflected the functionality of the feature (Membership.dll, Dues.dll, etc). This made it easy to update an area of the product and deploy that assembly (along with it's associated Business Layer assembly). In 2.0, I can use pure dynamic compilation (ick - source code on the server); fixed_names (ick - hundreds or...
8
1786
by: Charles Law | last post by:
I'm sorry to keep harping on about this one, but it is really quite important for me to be able to list _all_ required assemblies in my Help About box. Herfried kindly posted some code before that lists _loaded_ assemblies and their version, but I have one assembly that is not loaded until the user has done something quite specific in the program, and I need to list this one too. Other applications seem to manage it, so I wonder how it can...
2
2239
by: Tim | last post by:
I have placed my assemblies in different folders (as per project req.). I am using config file with <codebase> option and registry with codebase option (COM Interop) to enable the runtime to locate the assemblies. Will I face any problems in future versions due to the usage of 'codebase' option? What precautionary measures need to be taken if the 'codebase' option is used?
3
2081
by: Claudio Pacciarini | last post by:
Hi everyone, I have a question about .NET code sharing and reuse, and also about application design best practices / guidelines. Currently, we have many different .NET projects in source depot. Although they are different, in some of them we share C# code by referencing source files that are external (not part of the projects) on each project. For instance, some of our projects have the typical “sources” file with:
4
2049
by: =?Utf-8?B?VzFsZDBuZTc0?= | last post by:
When one architects a new project one of the first steps in the decision is to decide on the layers. (In my opinion anyway) One architecture that I have used before is to go solid OO and create objects, which normally are very small and only deals with the stuff pertaining to that object, then break it down into Business Process, Process Controllers and Data Access Objects for each "Object", each of which is created in it's very own .Net...
5
1429
by: =?Utf-8?B?U3RlZmFuIEJhcmxvdw==?= | last post by:
I am experiencing a lot of speed issues on initial app loads where we are referencing 3rd party 1.1 assemblies from 2.0 code. Those 1.1 assemblies reference things like System.Windows.Forms (totally unnecessarily I might add). I'm assuming our memory footprint will practically double by re-loading the System, System.Web, System.Windows.Forms assemblies. This also causes a significant bottleneck. For example:
2
5116
by: Smithers | last post by:
I have a Windows Forms application that implements a plug-in architecture whereby required assemblies are identified and loaded dynamically. Here are the relevant classes: A = application = Windows Forms class B = a singleton hosted within A. B is responsible for dynamically loading classes X, Y, and Z.
0
9710
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, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9589
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
10593
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
10340
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
10329
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,...
0
6858
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
5527
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
5663
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3830
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.