Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / July 2005

Tip: Looking for answers? Try searching our database.

Using two libraries with the same name in one project

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Albert Greinöcker - 10 Jul 2005 12:37 GMT
Hi NG,

I have a problem using two dlls in c# via COM which have the same name (and
namespace structure, also the classmodel is identical), they just differ in
their Version, but I want to use them both in my Application. As a
workaround I tried to generate two extra projects for each dll (which should
serve as something like a "wrapper") and set dependencies (these two
projects) in my main project. And now the problem comes up: Visual studio
copies just one of the dlls to the debug-directory of the main application,
and uses just this one (so the functionality of the second dll gets lost).

I know this problem is a bit hard to describe, but I hope someone
understands what's going on and can give me some hints. Maybe one solution
would be to instruct Visual Studio to copy the dlls in different
directories, but I don't know how to do so :-(

Another question which fits into this topic: how can I define some
post-compilation steps (e.g. after compilation, copy the dll to a special
destination folder) in Visual Studio, because this could eventually solve my
problem?

Thanks,
Albert
Mattias Sjögren - 10 Jul 2005 14:28 GMT
Albert,

>I have a problem using two dlls in c# via COM which have the same name (and
>namespace structure, also the classmodel is identical), they just differ in
>their Version, but I want to use them both in my Application.

If you use Tlbimp to generate interop assemblies for the COM
libraries, you can specify different output filenames and namespaces.

>Another question which fits into this topic: how can I define some
>post-compilation steps (e.g. after compilation, copy the dll to a special
>destination folder) in Visual Studio, because this could eventually solve my
>problem?

In the Project properties dialog, under Common Properties, Build
Events.

Mattias

Signature

Mattias Sjögren [MVP]  mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.