1

My .NET app referencing com object. My task is to be able to build my app without changing my code with different dll which is referenced on it.

How can i reference 2 versions of the same com reference? Is configuration manager can help here?

thanks

CharlesB
  • 86,532
  • 28
  • 194
  • 218
eyal
  • 369
  • 1
  • 5
  • 14
  • This might help: http://stackoverflow.com/questions/223195/referencing-different-versions-of-the-same-assembly – Kon Mar 28 '11 at 15:34

1 Answers1

1

If the other version is backward compatible, you can just replace the existing reference with the new one. If it's not backward compatible, you may need to change some of your code. If you want to use some of the functions in the new version, you may also need to change some code.

Beth
  • 9,531
  • 1
  • 24
  • 43
  • 1
    This makes about as much sense as the question! – David Heffernan Mar 28 '11 at 15:20
  • let me rephrase my question: i want to be able to build my app with BOTH versions, so in the end i'll get 2 versions of my app, each one referencing different dll. i want to acheive that without duplicating my project. – eyal Mar 28 '11 at 20:57
  • You should be able to add multiple versions of the same .dll to your project references, but how to distinguish between them at runtime is beyond me. How do you know which version of the component you want to use? – Beth Mar 28 '11 at 21:36