473,795 Members | 2,999 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 1210
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
2952
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
1547
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
1784
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
2236
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
2080
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
2048
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
1426
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
9673
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
9522
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
10217
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
9046
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 projectplanning, coding, testing, and deploymentwithout 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...
1
7544
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
6784
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
5440
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
5566
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2922
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.