472,958 Members | 2,172 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Dynamically accessing the most current version of an assembly

I'm accessing MSOutlook via Microsoft.Office.Interop.Outlook. It works
fine if I add a reference to either version 11 (Outlook 2003) or
version 12 (Outlook 2007) of the interop assembly to my project.
However, I don't want to build two different applications for each
version; I want my application to detect and use the current version
at runtime. But when I load the assembly at runtime, I don't have
access to its classes at compile time and I have to access everything
through reflection. Isn't there an easyer way?

Feb 1 '07 #1
1 2095
On 1 Feb., 13:48, z...@gmx.net wrote:
I'm accessing MSOutlook via Microsoft.Office.Interop.Outlook. It works
fine if I add a reference to either version 11 (Outlook 2003) or
version 12 (Outlook 2007) of the interop assembly to my project.
However, I don't want to build two different applications for each
version; I want my application to detect and use the current version
at runtime. But when I load the assembly at runtime, I don't have
access to its classes at compile time and I have to access everything
through reflection. Isn't there an easyer way?
I just figured it out myself. In my project, I have to add a reference
to the older version, but it turns out that this will work out fine
when only the newer version is present at runtime.
I can work directly with everything from the old interface, and I can
load the new version (if present) dynamically, and access the classes
that aren't present in the old version using reflection. (Which isn't
half as bad as accessing everything through reflection).

Feb 1 '07 #2

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

Similar topics

3
by: Ahmet | last post by:
Hi; How can I get control list (Controls) of a form in a dll dynamically activated using Activators.CreateInstance. I need all controls names and attributes of one form which is in one dll. Is...
1
by: Jon Davis | last post by:
I'm trying to access my application files for a plug-in I'm building for a third party application. I have an assembly with several dependency assemblies. The dependency assemblies are in the...
1
by: Benjamin | last post by:
Hi, I'm currently writing a Web Services that interacts with a database. To allow me to use not just one database provider (for example, I could use MS Access, SQL Server or MySQL), the Web...
4
by: Shiju Poyilil | last post by:
Hello EveryBody, I have a dropdownlist with some values as .net server controls & a button , on clicking a button i need to generate the choosen contorl dynamically. I am giving a small glimpse...
5
by: volvox | last post by:
hi, is it possible to access protected mode registers (EAX , EBX,ECX...) via assembly in C .
2
by: Smithers | last post by:
Using 3.5, I am stuck in attempting to: 1. Dynamically load an assembly 2. Instantiate a class from that assembly (the client code is in a different namespace than the namespace of the...
1
by: Jordan S. | last post by:
I plan to load an assembly during application startup, and load that assembly via reflection (i.e., it isn't referenced in the application's assembly manifest). The assembly will be loaded into the...
9
by: =?Utf-8?B?VGhvbWFzIFcuIEJyb3du?= | last post by:
"parez" wrote: Assembly.LoadWithPartialName does indeed work!! Now, why is this incredibly useful routine deprecated and we are instructed to use Assembly.Load instead which does not provide...
7
by: RichB | last post by:
I am trying to get to grips with the asp.net ajaxcontrol toolkit, and am trying to add a tabbed control to the page. I have no problems within the aspx file, and can dynamically manipulate a...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.