473,394 Members | 1,761 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,394 software developers and data experts.

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 programmatically to load these dlls when necessary and
work with them without adding them as reference during coding?

Regards,
Shilpa

Mar 12 '07 #1
2 1191
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.comwrote in message
news:11**********************@30g2000cwc.googlegro ups.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 programmatically 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.comwrote in message
news:11**********************@30g2000cwc.googlegro ups.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 programmatically 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
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...
9
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...
5
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...
8
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)....
8
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...
2
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...
3
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...
4
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...
5
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...
2
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 =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
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
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
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...

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.