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

evil COM & reflection problem please help :(

I can't get my head around the following problem no matter how I try.
..NET 1.1, C#.
There's an assembly A that outputs a COM component.
It dynamically loads a class from assembly B using Activator (assembly
B is loaded from a file).
Assembly B uses a class from assembly C that sits in GAC; project B
references a dll in project C output folder to make this possible.
Everything works.

As soon as the version of assembly C changes, project B start
referencing the new version and everything breaks, when I call
activator.CreateInstance in assembly A I get an error telling me it
cannot load the assembly C (even though the old version is in GAC and
they are 100% compartable).

How do I make the loader ignore versions and use the assembly from GAC
anyway?
Or, how do I reference the assembly right in the GAC?
Right now I have to reinstall assembly into GAC after each error and I
suspect there might be some problems on users' machines when I deploy.

Aug 9 '06 #1
1 1132
You have to be carefull with the dll versions of the new C assembly
versions.
..Net uses some rules to determine with version of dlls in CAG it'll loads.

See the msdn about assembly versions rules..
Another way is make a reference to a specific version of assembly, you can
do it in app.config.

[]'s
Oberdan

<re******@gmail.comwrote in message
news:11**********************@n13g2000cwa.googlegr oups.com...
>I can't get my head around the following problem no matter how I try.
.NET 1.1, C#.
There's an assembly A that outputs a COM component.
It dynamically loads a class from assembly B using Activator (assembly
B is loaded from a file).
Assembly B uses a class from assembly C that sits in GAC; project B
references a dll in project C output folder to make this possible.
Everything works.

As soon as the version of assembly C changes, project B start
referencing the new version and everything breaks, when I call
activator.CreateInstance in assembly A I get an error telling me it
cannot load the assembly C (even though the old version is in GAC and
they are 100% compartable).

How do I make the loader ignore versions and use the assembly from GAC
anyway?
Or, how do I reference the assembly right in the GAC?
Right now I have to reinstall assembly into GAC after each error and I
suspect there might be some problems on users' machines when I deploy.

Aug 9 '06 #2

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

Similar topics

1
by: phoenix | last post by:
Hello, I'm using the webbrowser control to display a webpage on my form. The first problem is the gets fired for every image which is completed as well. http://support.microsoft.com/?id=180366...
12
by: SJD | last post by:
I've just read Christoph Schittko's article on XmlSerializer: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnxmlnet/html/trblshtxsd.asp . . . and very informative it is too....
14
by: vicky | last post by:
SUMMARY: THREE YEARS of and continuing MENTAL TORTURE, TERRORISM, SADISM and BLATANT human rights violations by FBI SADISTS and PERVERTS. Please SAVE this post on your hard disks or email...
1
by: Mike Malter | last post by:
I am just starting to work with reflection and I want to create a log that saves relevant information if a method call fails so I can call that method again later using reflection. I am...
3
by: Doug | last post by:
Does anyone know of a way that you can use System.Reflection.MethodInfo to get a list of methods within a class and NOT have it show the Get and Set methods of properties?
8
by: paccala | last post by:
Ciao Being google-ing since hours and still I'm not able to solve my problem... I have following hierarchy: class A { public void myMethod(); }
2
by: Shmuel Cohen | last post by:
I have a class holding some enumerated types, i.e., public class MyEnums { public enum DATA_ITEM {FIRST, SECOND, THIRD,FOURTH,FIFTH}; ... } And I have a class the contains data, for example:
7
by: Clint Herron | last post by:
Howdy! I posted this question on CSharpCorner.com, but then realized I should probably post it on a more active newsgroup. This will be my only cross-post. I'm creating a game engine, and...
5
by: Mercdev | last post by:
I have an ActiveX control inherited from UserControl. This control is hosted in IE(version 6 or later). How i can navigate IE from this control. I know that i need to obtain IWebBrowser2 interface...
0
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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...
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
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...

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.