Using multiple versions of same lib as reference

  • Thread starter Thread starter sandman
  • Start date Start date
S

sandman

I'm writing a conversion utility to move data from ver 1 of my C#
WinForms app (Access database) to ver 2 (SQL server). I realized that I
have most of the tools I need already written (read and write data) and
they are in separate .NET projects. But when I wrote ver 2, I kept all
the namespaces and class names the same. I've gone thru and renamed the
output dll's in ver 2 so I can reference both sets of libraries in my
conversion project but how can I access the classes? "Using" only
recognizes the namespaces, so only one appears. I'd hate to have to do
a global search and replace and rename everything in ver 2. Is there
something like Lib1::MyLib.MyClass and Lib2::MyLib.MyClass?
 
sandman,

Yes, there is, but you can only do this in version 2.0 of .NET. It
allows you to set a reference to two versions of the same assembly, and then
assign a global namespace qualifier to the separate assembly versions (even
alias them).

However, in 1.1 and before, it is not possible.

Hope this helps.
 
Well, [expletive deleted]! Justification for an upgrade but not soon
enough. Thanks for your help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top