I have 1 DLL in the .Net 3.5 framework and another in 2.0. The ListBoxItem
class exists in 2.0 and I have linked the class in the 3.5 DLL in the same namespace.
When I try to compile I get an "exists in both" error. How can I compile this and maintain the same structure.
I don't want reference the 2.0 DLL to 3.5 to eliminate this problem, I want keep these DLLs separate.
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?
This is a relevant solution as well, where you can define which type to use in your usings:
https://stackoverflow.com/a/9194582/178620
You can't use fully qualified names when dealing with Extension methods and etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With