tags:

views:

1152

answers:

2

I have 1 dll in framework 3.5 and another in 2.0, where ListBoxItem class exists in 2.0 and have linked class in 3.5 dll. in same namespace.

When i try compile give a "exists in both" errors. Howto do for can compile and maintain same structure.

I don't want reference 2.0 dll to 3.5 for eliminate this problem, i want keep this dlls separated.

A: 

Split them into two different solutions, one for .NET 2.0 and the other for .NET 3.5. Otherwise, how would .NET knows how to load which one?

Adrian Godong
OK i have it. But when i create a web project with this 2 dlls referenced, erros comming.
pho3nix
Solutions != projects.
Adrian Godong
Yes its true. fooled me.
pho3nix
A: 

This doesn't seem like a good idea no matter what, but change the namespaces and fully qualify your usages.

Otherwise, why don't you just reference one dll?

Bryan Rowe
If i change namespaces this 2 dlls can't be used in same method because have 2 diferent signatures.
pho3nix
I don't want instance 2.0 dll in 3.5 dll because 2.0 dll have big references added and when i compile it compile my 3.5, 2.0 dlls more all referenced dlls in 2.0, for what i can have 15 dlls when i can have only 2 dlls im my bin folder.
pho3nix
You need to rework the english in the last couple posts. I have no clue what you are saying. Maybe just make it all one dll?
Bryan Rowe
Sorry for my english :). I resolved the problem myself. I introduced an interface and eliminated the class in framework 3.5, next replaced all references to this class with interface.
pho3nix
Glad you figured it out.
Bryan Rowe