We help IT Professionals succeed at work.

C# Referencing two different COM objects with the same namespace.

mservidio
mservidio asked
on
303 Views
Last Modified: 2013-11-07
Hi All -

I have 2 COM objects that I need to reference within my C# application.

COM Object 1: TestA Version 1
COM Object 2: TestA Version 2

I am having an issue referencing both versions, as VS won't let me import the second reference. It says: " A reference to 'TestA Version 2' could not be added. A reference to this type library already exists. You must remove the reference 'TestA' before adding this one.

Any ideas on how I can import both, and use both side by side?

Thanks,
Mark
Comment
Watch Question

Meir RivkinFull stack Software Engineer
CERTIFIED EXPERT

Commented:
they have different names and versions and still it won't let u reference both?

Author

Commented:
See screenshots...
untitled.JPG
untitled2.JPG

Author

Commented:
To answer your question, yes they have different "Component Names". However, the namespaces within both COM files are the same. I think this is where the issue is coming from.
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.